Class BlockOpenable

Direct Known Subclasses:
BlockFenceGate, BlockWoodenTrapDoor

public class BlockOpenable extends BlockType
Represents blocks that can be opened through a right-click. A block can be opened if its MaterialData implements Openable.
  • Constructor Details

    • BlockOpenable

      public BlockOpenable()
  • Method Details

    • blockInteract

      public boolean blockInteract(GlowPlayer player, GlowBlock block, org.bukkit.block.BlockFace face, org.bukkit.util.Vector clickedLoc)
      Description copied from class: BlockType
      Called when a player attempts to interact with (right-click) a block of this type already in the world.
      Overrides:
      blockInteract in class BlockType
      Parameters:
      player - the player interacting
      block - the block interacted with
      face - the clicked face
      clickedLoc - where in the block the click occurred
      Returns:
      Whether the interaction occurred.
    • onOpened

      protected void onOpened(GlowPlayer player, GlowBlock block, org.bukkit.block.BlockFace face, org.bukkit.util.Vector clickedLoc, GlowBlockState state, org.bukkit.material.MaterialData materialData)
    • onClosed

      protected void onClosed(GlowPlayer player, GlowBlock block, org.bukkit.block.BlockFace face, org.bukkit.util.Vector clickedLoc, GlowBlockState state, org.bukkit.material.MaterialData materialData)