Class BlockManager

java.lang.Object
com.ranull.graves.manager.BlockManager

public final class BlockManager extends Object
The BlockManager class is responsible for managing block data and operations related to graves.
  • Field Details

    • plugin

      private final Graves plugin
  • Constructor Details

    • BlockManager

      public BlockManager(Graves plugin)
      Initializes a new instance of the BlockManager class.
      Parameters:
      plugin - The plugin instance.
  • Method Details

    • getBlockData

      public BlockData getBlockData(org.bukkit.block.Block block)
      Gets the BlockData associated with the specified block.
      Parameters:
      block - The block to get the data for.
      Returns:
      The BlockData associated with the block, or null if not found.
    • getGraveFromBlock

      public Grave getGraveFromBlock(org.bukkit.block.Block block)
      Gets the grave associated with the specified block.
      Parameters:
      block - The block to get the grave for.
      Returns:
      The grave associated with the block, or null if not found.
    • getGraveFromBlockLocation

      public Grave getGraveFromBlockLocation(org.bukkit.Location location)
      Gets the grave block associated with the specified location.
      Parameters:
      location - The location to get the grave for.
      Returns:
      The grave associated with the location, or null if not found.
    • createBlock

      public void createBlock(org.bukkit.Location location, Grave grave)
      Creates a block at the specified location for the given grave.
      Parameters:
      location - The location to create the block.
      grave - The grave associated with the block.
    • getBlockDataList

      public List<BlockData> getBlockDataList(Grave grave)
      Gets a list of BlockData associated with the given grave.
      Parameters:
      grave - The grave to get the BlockData list for.
      Returns:
      A list of BlockData associated with the grave.
    • getBlockList

      public List<org.bukkit.Location> getBlockList(Grave grave)
      Gets a list of locations of blocks associated with the given grave.
      Parameters:
      grave - The grave to get the block locations for.
      Returns:
      A list of locations of blocks associated with the grave.
    • removeBlock

      public void removeBlock(Grave grave)
      Removes all blocks associated with the given grave.
      Parameters:
      grave - The grave to remove the blocks for.
    • removeBlock

      public void removeBlock(BlockData blockData)
      Removes a specific block represented by the given BlockData.
      Parameters:
      blockData - The BlockData representing the block to remove.