Class HoneypotPlayerManager
java.lang.Object
org.reprogle.honeypot.common.storagemanager.HoneypotPlayerManager
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddPlayer(org.bukkit.entity.Player player, int blocksBroken) Create a honeypot block by calling the SQLite DB.voidDelete's all players in the DBintgetCount(org.bukkit.entity.Player playerName) Return the action for the honeypot block (Meant for ban, kick, etc.)static HoneypotPlayerManagerReturns the singleton instance of this classvoidsetPlayerCount(org.bukkit.entity.Player player, int blocksBroken) Set the number of blocks broken by the player by calling the SQLite setPlayerCount function.
-
Method Details
-
getInstance
Returns the singleton instance of this class- Returns:
- The
HoneypotPlayerManagerinstance
-
addPlayer
public void addPlayer(org.bukkit.entity.Player player, int blocksBroken) Create a honeypot block by calling the SQLite DB. In the future this will be a switch case statement to handle multiple DB types- Parameters:
player- The Player objectblocksBroken- The amount of Blocks broken
-
setPlayerCount
public void setPlayerCount(org.bukkit.entity.Player player, int blocksBroken) Set the number of blocks broken by the player by calling the SQLite setPlayerCount function. In the future this will be a switch case statement to handle multiple DB types without changing code- Parameters:
player- The Player objectblocksBroken- The amount of blocks broken by the player
-
getCount
public int getCount(org.bukkit.entity.Player playerName) Return the action for the honeypot block (Meant for ban, kick, etc.)- Parameters:
playerName- the Player name- Returns:
- The amount of Honeypot blocks the player has broken
-
deleteAllHoneypotPlayers
public void deleteAllHoneypotPlayers()Delete's all players in the DB
-