Package me.kzlyth.api.notes
Klasse Note
java.lang.Object
me.kzlyth.api.notes.Note
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
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibung@Nullable StringGets additional data associated with this note.intgetId()Gets the unique ID of this note.@NotNull StringgetNote()Gets the note content.@NotNull StringGets the name of the target player at the time the note was created.@NotNull UUIDGets the UUID of the target player.@NotNull StringGets the name of the staff member who created this note.longGets the timestamp when the note was created.toString()
-
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 IDplayerUuid- The target player's UUIDplayerName- The target player's namenote- The note contentstaffName- The staff member's nametimestamp- 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
Gets the UUID of the target player.- Gibt zurück:
- The target player's UUID
-
getPlayerName
Gets the name of the target player at the time the note was created.- Gibt zurück:
- The target player's name
-
getNote
Gets the note content.- Gibt zurück:
- The note content
-
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
Gets additional data associated with this note.- Gibt zurück:
- Additional data as JSON string, or
nullif none
-
toString
-