Class CustomBlockBreakListener

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

public class CustomBlockBreakListener extends Object implements org.bukkit.event.Listener
A listener for handling ItemsAdder's CustomBlockBreakEvent. This class is responsible for cancelling the block break event for graves, depending on the configuration settings in the Graves plugin.
  • Field Details

    • plugin

      private final Graves plugin
  • Constructor Details

    • CustomBlockBreakListener

      public CustomBlockBreakListener(Graves plugin)
      Constructs a new CustomBlockBreakListener.
      Parameters:
      plugin - the instance of the Graves plugin
  • Method Details

    • onBlockBreakIA

      public void onBlockBreakIA(dev.lone.itemsadder.api.Events.CustomBlockBreakEvent event)
      Handles the CustomBlockBreakEvent for ItemsAdder custom blocks. Cancels the event if the block is part of a grave and the configuration for preventing block breaking is enabled.
      Parameters:
      event - the ItemsAdder CustomBlockBreakEvent triggered when a custom block is broken