Package nl.minetopiasdb.api
Class CriminalRecordManager
java.lang.Object
nl.minetopiasdb.api.CriminalRecordManager
Class used to see or modify the criminal records of a player.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addCriminalActivity
(UUID uuid, String description) Deprecated.This method has vague naming and is now deprecated.Add an entry to the criminal record of a playervoid
deleteCriminalActivity
(UUID uuid, int id) Deprecated.This method has vague naming and is now deprecated.void
deleteCriminalActivity
(UUID uuid, String description) Deprecated.This method has vague naming and is now deprecated.deleteEntry
(UUID uuid, int id) Delete an entry from the criminal activity of a playerdeleteEntry
(UUID uuid, String description) Deprecated.You should delete by id insteaddeleteEntry(UUID, int)
getCriminalActivities
(UUID uuid) Get a list of the criminal activities the provided player has comitted.static CriminalRecordManager
Get an instance of CriminalRecordManager.
-
Constructor Details
-
CriminalRecordManager
public CriminalRecordManager()
-
-
Method Details
-
getInstance
Get an instance of CriminalRecordManager.
NOTE: Currently, CriminalRecordManager doesn't cache any data. If you're planning on actively using these methods, please maintain your own cache to decrease database load.- Returns:
- instance of CriminalRecordManager.
-
getCriminalActivities
Get a list of the criminal activities the provided player has comitted. NOTE: Please call this method async!- Parameters:
uuid
- UUID of player- Returns:
- list of criminal activities.
-
addEntry
Add an entry to the criminal record of a player- Parameters:
uuid
- uuid of playerdescription
- description of the criminal activity- Returns:
CompletableFuture
containing the ID of the inserted row
-
deleteEntry
Delete an entry from the criminal activity of a player- Parameters:
uuid
- uuid of playerid
- id of the entry- Returns:
CompletableFuture
returning true if a row has been deleted
-
deleteEntry
Deprecated.You should delete by id insteaddeleteEntry(UUID, int)
Delete an entry from the criminal activity of a player- Parameters:
uuid
- uuid of playerdescription
- description of this criminal activity- Returns:
CompletableFuture
-
addCriminalActivity
Deprecated.This method has vague naming and is now deprecated. As of v2.4 the preferred way of doing this is usingaddEntry(UUID, String)
.Add a criminal activity to a player- Parameters:
uuid
- uuid of playerdescription
- description of this criminal activity
-
deleteCriminalActivity
Deprecated.This method has vague naming and is now deprecated. As of v2.4 the preferred way of doing this is usingdeleteEntry(UUID, String)
.Delete a criminal activity from a player- Parameters:
uuid
- uuid of playerdescription
- description of this criminal activity
-
deleteCriminalActivity
Deprecated.This method has vague naming and is now deprecated. As of v2.4 the preferred way of doing this is usingdeleteEntry(UUID, int)
.Delete a criminal activity from a player- Parameters:
uuid
- uuid of playerid
- id of the criminal activity
-