Package com.ranull.graves.listener
Class BlockPistonExtendListener
java.lang.Object
com.ranull.graves.listener.BlockPistonExtendListener
- All Implemented Interfaces:
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 -
Constructor Summary
ConstructorsConstructorDescriptionBlockPistonExtendListener
(Graves plugin) Constructs a new BlockPistonExtendListener with the specified Graves plugin. -
Method Summary
Modifier and TypeMethodDescriptionprivate 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.
-
Field Details
-
plugin
-
-
Constructor Details
-
BlockPistonExtendListener
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
-