Package com.ranull.graves.compatibility
Class CompatibilityBlockData
java.lang.Object
com.ranull.graves.compatibility.CompatibilityBlockData
- All Implemented Interfaces:
Compatibility
An implementation of the Compatibility interface for handling block data.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Checks if a player can build at a given location.org.bukkit.inventory.ItemStack
getSkullItemStack
(Grave grave, Graves plugin) Gets the skull item stack for a given grave.getSkullTexture
(org.bukkit.inventory.ItemStack itemStack) Gets the texture of a skull item stack.boolean
hasTitleData
(org.bukkit.block.Block block) Checks if a block has title data.setBlockData
(org.bukkit.Location location, org.bukkit.Material material, Grave grave, Graves plugin) Sets the block data for a given location and material, associating it with a grave.
-
Constructor Details
-
CompatibilityBlockData
public CompatibilityBlockData()
-
-
Method Details
-
setBlockData
public BlockData setBlockData(org.bukkit.Location location, org.bukkit.Material material, Grave grave, Graves plugin) Sets the block data for a given location and material, associating it with a grave.- Specified by:
setBlockData
in interfaceCompatibility
- Parameters:
location
- The location where the block data should be set.material
- The material of the block to set.grave
- The grave associated with the block.plugin
- The Graves plugin instance.- Returns:
- The BlockData representing the set block data.
-
canBuild
public boolean canBuild(org.bukkit.entity.Player player, org.bukkit.Location location, Graves plugin) Checks if a player can build at a given location.- Specified by:
canBuild
in interfaceCompatibility
- Parameters:
player
- The player to check.location
- The location to check.plugin
- The Graves plugin instance.- Returns:
- True if the player can build at the location, false otherwise.
-
hasTitleData
public boolean hasTitleData(org.bukkit.block.Block block) Checks if a block has title data.- Specified by:
hasTitleData
in interfaceCompatibility
- Parameters:
block
- The block to check.- Returns:
- True if the block has title data, false otherwise.
-
getSkullItemStack
Gets the skull item stack for a given grave.- Specified by:
getSkullItemStack
in interfaceCompatibility
- Parameters:
grave
- The grave associated with the skull.plugin
- The Graves plugin instance.- Returns:
- The ItemStack representing the skull.
-
getSkullTexture
Gets the texture of a skull item stack.- Specified by:
getSkullTexture
in interfaceCompatibility
- Parameters:
itemStack
- The item stack representing the skull.- Returns:
- The texture of the skull as a string.
-