Package com.ranull.graves.listener
Class BlockFromToListener
java.lang.Object
com.ranull.graves.listener.BlockFromToListener
- All Implemented Interfaces:
org.bukkit.event.Listener
Listens for BlockFromToEvent to prevent water or lava from flowing over grave blocks.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBlockFromToListener
(Graves plugin) Constructs a new BlockFromToListener with the specified Graves plugin. -
Method Summary
Modifier and TypeMethodDescriptionprivate boolean
isGraveBlock
(org.bukkit.event.block.BlockFromToEvent event) Checks if the destination block of the fluid is a grave block.void
onBlockFromTo
(org.bukkit.event.block.BlockFromToEvent event) Handles BlockFromToEvent to prevent fluid from flowing into grave blocks.
-
Field Details
-
plugin
-
-
Constructor Details
-
BlockFromToListener
Constructs a new BlockFromToListener with the specified Graves plugin.- Parameters:
plugin
- The Graves plugin instance.
-
-
Method Details
-
onBlockFromTo
public void onBlockFromTo(org.bukkit.event.block.BlockFromToEvent event) Handles BlockFromToEvent to prevent fluid from flowing into grave blocks.- Parameters:
event
- The BlockFromToEvent to handle.
-
isGraveBlock
private boolean isGraveBlock(org.bukkit.event.block.BlockFromToEvent event) Checks if the destination block of the fluid is a grave block.- Parameters:
event
- The BlockFromToEvent to check.- Returns:
- True if the destination block is a grave block, false otherwise.
-