Package com.ranull.graves.compatibility
Interface Compatibility
- All Known Implementing Classes:
CompatibilityBlockData
,CompatibilityMaterialData
public interface Compatibility
An interface to handle compatibility between different server versions and plugins.
-
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.
-
Method Details
-
setBlockData
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.- 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
Checks if a player can build at a given location.- 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
boolean hasTitleData(org.bukkit.block.Block block) Checks if a block has title data.- 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.- 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.- Parameters:
itemStack
- The item stack representing the skull.- Returns:
- The texture of the skull as a string.
-