Class BlockFromToListener

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

public class BlockFromToListener extends Object implements org.bukkit.event.Listener
Listens for BlockFromToEvent to prevent water or lava from flowing over grave blocks.
  • Field Summary

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

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

    Modifier and Type
    Method
    Description
    private 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.

    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

    • BlockFromToListener

      public BlockFromToListener(Graves plugin)
      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.