Class ProjectClickListener
java.lang.Object
com.ranull.graves.listener.integration.furniturelib.ProjectClickListener
- All Implemented Interfaces:
org.bukkit.event.Listener
Listens for ProjectClickEvent from FurnitureLib and handles the event based on the presence of associated graves.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionProjectClickListener
(Graves plugin, FurnitureLib furnitureLib) Constructs a new ProjectClickListener with the specified Graves and FurnitureLib instances. -
Method Summary
Modifier and TypeMethodDescriptionprivate 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.
-
Field Details
-
plugin
-
furnitureLib
-
-
Constructor Details
-
ProjectClickListener
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.
-