Class ProjectClickListener

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

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

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

    Constructors
    Constructor
    Description
    ProjectClickListener(Graves plugin, FurnitureLib furnitureLib)
    Constructs a new ProjectClickListener with the specified Graves and FurnitureLib instances.
  • Method Summary

    Modifier and Type
    Method
    Description
    private void
    handleProjectClick(de.Ste3et_C0st.FurnitureLib.SchematicLoader.Events.ProjectClickEvent event)
    Handles the ProjectClickEvent.
    private boolean
    hasUUID(de.Ste3et_C0st.FurnitureLib.SchematicLoader.Events.ProjectClickEvent event)
    Checks if the ProjectClickEvent has a UUID associated with it.
    void
    onProjectClick(de.Ste3et_C0st.FurnitureLib.SchematicLoader.Events.ProjectClickEvent event)
    Handles ProjectClickEvent.

    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
    • furnitureLib

      private final FurnitureLib furnitureLib
  • Constructor Details

    • ProjectClickListener

      public ProjectClickListener(Graves plugin, FurnitureLib furnitureLib)
      Constructs a new ProjectClickListener with the specified Graves and FurnitureLib instances.
      Parameters:
      plugin - The Graves instance to use.
      furnitureLib - The FurnitureLib instance to use.
  • Method Details

    • onProjectClick

      public void onProjectClick(de.Ste3et_C0st.FurnitureLib.SchematicLoader.Events.ProjectClickEvent event)
      Handles ProjectClickEvent. If the project being clicked is associated with a grave, it cancels the event and opens the grave for the player.
      Parameters:
      event - The ProjectClickEvent to handle.
    • hasUUID

      private boolean hasUUID(de.Ste3et_C0st.FurnitureLib.SchematicLoader.Events.ProjectClickEvent event)
      Checks if the ProjectClickEvent has a UUID associated with it.
      Parameters:
      event - The ProjectClickEvent.
      Returns:
      True if the event has a UUID, false otherwise.
    • handleProjectClick

      private void handleProjectClick(de.Ste3et_C0st.FurnitureLib.SchematicLoader.Events.ProjectClickEvent event)
      Handles the ProjectClickEvent. If the project is associated with a grave, cancels the event and opens the grave for the player.
      Parameters:
      event - The ProjectClickEvent.