Class HoneypotPlayerHistoryManager
java.lang.Object
org.reprogle.honeypot.common.storagemanager.HoneypotPlayerHistoryManager
A class for managing Honeypot history entries.
Adds functions for creating, removing, querying, and purging the history
database.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPlayerHistory(org.bukkit.entity.Player p, HoneypotBlockObject b) Add an entry to the player history tablevoidA function to purge the entire history tablevoiddeletePlayerHistory(org.bukkit.entity.Player p, int... n) Delete all history for a particular player.static HoneypotPlayerHistoryManagerReturns the singleton instance of this classgetPlayerHistory(org.bukkit.entity.Player p) Get the history for a player
-
Constructor Details
-
HoneypotPlayerHistoryManager
public HoneypotPlayerHistoryManager()
-
-
Method Details
-
getInstance
Returns the singleton instance of this class- Returns:
- The
HoneypotPlayerHistoryManagerinstance
-
addPlayerHistory
Add an entry to the player history table- Parameters:
p- The player to addb- The honeypot block they triggered
-
getPlayerHistory
Get the history for a player- Parameters:
p- The player to grab history for- Returns:
- A list of all HoneypotPlayerHistory objects
-
deletePlayerHistory
public void deletePlayerHistory(org.bukkit.entity.Player p, int... n) Delete all history for a particular player. An optional n parameter for specifying the number of most recent rows to delete- Parameters:
p- The player to deleten- Optional, the number of most recent rows
-
deleteAllHistory
public void deleteAllHistory()A function to purge the entire history table
-