Klasse Note

java.lang.Object
me.kzlyth.api.notes.Note

public class Note extends Object
Represents a note entry retrieved from the database.

This model contains information about a note including ID, target player, note content, staff member, timestamp, and optional additional data.

Example:


 NotesAPI notesAPI = api.getNotesAPI();
 Note note = notesAPI.getNoteById(123).join();
 if (note != null) {
     getLogger().info("Note #" + note.getId() + ": " + note.getNote());
     getLogger().info("Player: " + note.getPlayerName());
     getLogger().info("Staff: " + note.getStaffName());
     getLogger().info("Date: " + new Date(note.getTimestamp()));
 }
 
Seit:
1.2.3
Autor:
Zenith-Studios
  • Konstruktordetails

    • Note

      public Note(int id, @NotNull @NotNull UUID playerUuid, @NotNull @NotNull String playerName, @NotNull @NotNull String note, @NotNull @NotNull String staffName, long timestamp, @Nullable @Nullable String additionalData)
      Constructs a new Note object.
      Parameter:
      id - The note ID
      playerUuid - The target player's UUID
      playerName - The target player's name
      note - The note content
      staffName - The staff member's name
      timestamp - The timestamp when created (in milliseconds since epoch)
      additionalData - Additional data (JSON string, can be null)
  • Methodendetails

    • getId

      public int getId()
      Gets the unique ID of this note.
      Gibt zurück:
      The note ID
    • getPlayerUuid

      @NotNull public @NotNull UUID getPlayerUuid()
      Gets the UUID of the target player.
      Gibt zurück:
      The target player's UUID
    • getPlayerName

      @NotNull public @NotNull String getPlayerName()
      Gets the name of the target player at the time the note was created.
      Gibt zurück:
      The target player's name
    • getNote

      @NotNull public @NotNull String getNote()
      Gets the note content.
      Gibt zurück:
      The note content
    • getStaffName

      @NotNull public @NotNull String getStaffName()
      Gets the name of the staff member who created this note.
      Gibt zurück:
      The staff member's name
    • getTimestamp

      public long getTimestamp()
      Gets the timestamp when the note was created.
      Gibt zurück:
      Timestamp in milliseconds since epoch
    • getAdditionalData

      @Nullable public @Nullable String getAdditionalData()
      Gets additional data associated with this note.
      Gibt zurück:
      Additional data as JSON string, or null if none
    • toString

      public String toString()
      Setzt außer Kraft:
      toString in Klasse Object