Class CompatibilityBlockData

java.lang.Object
com.ranull.graves.compatibility.CompatibilityBlockData
All Implemented Interfaces:
Compatibility

public final class CompatibilityBlockData extends Object implements Compatibility
An implementation of the Compatibility interface for handling block data.
  • 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 interface Compatibility
      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 interface Compatibility
      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 interface Compatibility
      Parameters:
      block - The block to check.
      Returns:
      True if the block has title data, false otherwise.
    • getSkullItemStack

      public org.bukkit.inventory.ItemStack getSkullItemStack(Grave grave, Graves plugin)
      Gets the skull item stack for a given grave.
      Specified by:
      getSkullItemStack in interface Compatibility
      Parameters:
      grave - The grave associated with the skull.
      plugin - The Graves plugin instance.
      Returns:
      The ItemStack representing the skull.
    • getSkullTexture

      public String getSkullTexture(org.bukkit.inventory.ItemStack itemStack)
      Gets the texture of a skull item stack.
      Specified by:
      getSkullTexture in interface Compatibility
      Parameters:
      itemStack - The item stack representing the skull.
      Returns:
      The texture of the skull as a string.