Class HoneypotBlockManager

java.lang.Object
org.reprogle.honeypot.common.storagemanager.HoneypotBlockManager

public class HoneypotBlockManager extends Object
  • Method Details

    • getInstance

      public static HoneypotBlockManager getInstance()
      Returns the singleton instance of this class
      Returns:
      The HoneypotBlockManager instance
    • createBlock

      public void createBlock(org.bukkit.block.Block block, String action)
      Create a Honeypot Block and add it to the DB
      Parameters:
      block - The Honeypot Block we're creating
      action - The action of the Honeypot
    • deleteBlock

      public void deleteBlock(org.bukkit.block.Block block)
      Delete a block from the Honeypot DB
      Parameters:
      block - The Honeypot Block we're deleting
    • isHoneypotBlock

      public boolean isHoneypotBlock(org.bukkit.block.Block block)
      Check if the block is a Honeypot block
      Parameters:
      block - The Block we're checking
      Returns:
      true or false
    • getHoneypotBlock

      public HoneypotBlockObject getHoneypotBlock(org.bukkit.block.Block block)
      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

      public String getAction(org.bukkit.block.Block block)
      Return the action for the honeypot Block
      Parameters:
      block - The Block we're checking
      Returns:
      The Honeypot's action as a string
    • deleteAllHoneypotBlocks

      public void deleteAllHoneypotBlocks(@Nullable org.bukkit.World world)
      Delete all Honeypots in the entire DB
    • getAllHoneypots

      public List<HoneypotBlockObject> getAllHoneypots(@Nullable org.bukkit.World world)
      Get all HoneypotBlockObject in the DB
      Returns:
      An array list of all HoneypotBlockObjects