Class BlockPistonExtendListener

java.lang.Object
com.ranull.graves.listener.BlockPistonExtendListener
All Implemented Interfaces:
org.bukkit.event.Listener

public class BlockPistonExtendListener extends Object implements org.bukkit.event.Listener
Listens for BlockPistonExtendEvent to prevent pistons from moving blocks that are graves or are near holograms of graves.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final Graves
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs a new BlockPistonExtendListener with the specified Graves plugin.
  • Method Summary

    Modifier and Type
    Method
    Description
    private void
    handleGravePistonMove(org.bukkit.event.block.BlockPistonExtendEvent event, Grave grave, org.bukkit.block.Block piston, org.bukkit.block.BlockFace direction, List<org.bukkit.block.Block> blocks)
     
    void
    onBlockPistonExtend(org.bukkit.event.block.BlockPistonExtendEvent event)
    Handles BlockPistonExtendEvent to prevent pistons from extending if they are moving a grave block or a block near a grave hologram unless configured otherwise.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • plugin

      private final Graves plugin
  • Constructor Details

    • BlockPistonExtendListener

      public BlockPistonExtendListener(Graves plugin)
      Constructs a new BlockPistonExtendListener with the specified Graves plugin.
      Parameters:
      plugin - The Graves plugin instance.
  • Method Details

    • onBlockPistonExtend

      public void onBlockPistonExtend(org.bukkit.event.block.BlockPistonExtendEvent event)
      Handles BlockPistonExtendEvent to prevent pistons from extending if they are moving a grave block or a block near a grave hologram unless configured otherwise.
      Parameters:
      event - The BlockPistonExtendEvent to handle.
    • handleGravePistonMove

      private void handleGravePistonMove(org.bukkit.event.block.BlockPistonExtendEvent event, Grave grave, org.bukkit.block.Block piston, org.bukkit.block.BlockFace direction, List<org.bukkit.block.Block> blocks)