Class HoneypotBlockManager
java.lang.Object
org.reprogle.honeypot.storagemanager.HoneypotBlockManager
-
Method Summary
Modifier and TypeMethodDescriptionvoidcreateBlock(org.bukkit.block.Block block, String action) Create a HoneypotBlockand add it to the DBvoidDelete all Honeypots in the entire DBvoiddeleteBlock(org.bukkit.block.Block block) Delete a block from the Honeypot DBgetAction(org.bukkit.block.Block block) Return the action for the honeypotBlockGet allHoneypotBlockObjectin the DBgetHoneypotBlock(org.bukkit.block.Block block) Get the Honeypot Block object from Cache or the DBstatic HoneypotBlockManagerReturns the singleton instance of this classbooleanisHoneypotBlock(org.bukkit.block.Block block) Check if the block is a Honeypot block
-
Method Details
-
getInstance
Returns the singleton instance of this class- Returns:
- The
HoneypotBlockManagerinstance
-
createBlock
Create a HoneypotBlockand add it to the DB- Parameters:
block- The Honeypot Block we're creatingaction- The action of the Honeypot
-
deleteBlock
public void deleteBlock(org.bukkit.block.Block block) Delete a block from the Honeypot DB- Parameters:
block- The HoneypotBlockwe're deleting
-
isHoneypotBlock
public boolean isHoneypotBlock(org.bukkit.block.Block block) Check if the block is a Honeypot block- Parameters:
block- TheBlockwe're checking- Returns:
- true or false
-
getHoneypotBlock
Get the Honeypot Block object from Cache or the DB- Parameters:
block- The Block to retrieve as a Honeypot Block Object- Returns:
- The Honeypot Block Object if it exists, null if it doesn't
-
getAction
Return the action for the honeypotBlock- Parameters:
block- The Block we're checking- Returns:
- The Honeypot's action as a string
-
deleteAllHoneypotBlocks
public void deleteAllHoneypotBlocks()Delete all Honeypots in the entire DB -
getAllHoneypots
Get allHoneypotBlockObjectin the DB- Returns:
- An array list of all HoneypotBlockObjects
-