Package com.ranull.graves.manager
Class BlockManager
java.lang.Object
com.ranull.graves.manager.BlockManager
The BlockManager class is responsible for managing block data and operations related to graves.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBlockManager
(Graves plugin) Initializes a new instance of the BlockManager class. -
Method Summary
Modifier and TypeMethodDescriptionvoid
createBlock
(org.bukkit.Location location, Grave grave) Creates a block at the specified location for the given grave.getBlockData
(org.bukkit.block.Block block) Gets the BlockData associated with the specified block.getBlockDataList
(Grave grave) Gets a list of BlockData associated with the given grave.List
<org.bukkit.Location> getBlockList
(Grave grave) Gets a list of locations of blocks associated with the given grave.getGraveFromBlock
(org.bukkit.block.Block block) Gets the grave associated with the specified block.getGraveFromBlockLocation
(org.bukkit.Location location) Gets the grave block associated with the specified location.void
removeBlock
(BlockData blockData) Removes a specific block represented by the given BlockData.void
removeBlock
(Grave grave) Removes all blocks associated with the given grave.
-
Field Details
-
plugin
-
-
Constructor Details
-
BlockManager
Initializes a new instance of the BlockManager class.- Parameters:
plugin
- The plugin instance.
-
-
Method Details
-
getBlockData
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
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
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
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
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
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
Removes all blocks associated with the given grave.- Parameters:
grave
- The grave to remove the blocks for.
-
removeBlock
Removes a specific block represented by the given BlockData.- Parameters:
blockData
- The BlockData representing the block to remove.
-