Class BlockObserver


public class BlockObserver extends BlockDirectional
  • Constructor Details

    • BlockObserver

      public BlockObserver()
  • Method Details

    • isPowered

      public static boolean isPowered(GlowBlock block)
    • getFace

      public static org.bukkit.block.BlockFace getFace(GlowBlock block)
      Returns the direction the given block is facing, if it's an observer, or null otherwise.
      Parameters:
      block - a block
      Returns:
      the direction the block is facing, or null if the block isn't an observer
    • onNearBlockChanged

      public void onNearBlockChanged(GlowBlock block, org.bukkit.block.BlockFace face, GlowBlock changedBlock, org.bukkit.Material oldType, byte oldData, org.bukkit.Material newType, byte newData)
      Description copied from class: BlockType
      Called when a neighboring block (within a 3x3x3 cube) has changed its type or data and physics checks should occur.
      Overrides:
      onNearBlockChanged in class BlockType
      Parameters:
      block - The block to perform physics checks for
      face - The BlockFace to the changed block, or null if unavailable
      changedBlock - The neighboring block that has changed
      oldType - The old type of the changed block
      oldData - The old data of the changed block
      newType - The new type of the changed block
      newData - The new data of the changed block
    • receivePulse

      public void receivePulse(GlowBlock block)
      Description copied from class: BlockType
      Called when the BlockType gets pulsed as requested.
      Overrides:
      receivePulse in class BlockType
      Parameters:
      block - The block that was pulsed