Class ProjectBreakListener

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

public class ProjectBreakListener extends Object implements org.bukkit.event.Listener
Listens for ProjectBreakEvent from FurnitureLib and handles the event based on the presence of associated graves.
  • Field Details

  • Constructor Details

    • ProjectBreakListener

      public ProjectBreakListener(FurnitureLib furnitureLib)
      Constructs a new ProjectBreakListener with the specified FurnitureLib instance.
      Parameters:
      furnitureLib - The FurnitureLib instance to use.
  • Method Details

    • onProjectBreak

      public void onProjectBreak(de.Ste3et_C0st.FurnitureLib.SchematicLoader.Events.ProjectBreakEvent event)
      Handles ProjectBreakEvent. If the project being broken is associated with a grave, it cancels the event to prevent the break.
      Parameters:
      event - The ProjectBreakEvent to handle.
    • isProjectAssociatedWithGrave

      private boolean isProjectAssociatedWithGrave(de.Ste3et_C0st.FurnitureLib.SchematicLoader.Events.ProjectBreakEvent event)
      Checks if the project being broken is associated with a grave.
      Parameters:
      event - The ProjectBreakEvent.
      Returns:
      True if the project is associated with a grave, false otherwise.