Class CitizensNPCInteractListener
java.lang.Object
dev.cwhead.GravesX.listener.integration.citizensnpcs.CitizensNPCInteractListener
- All Implemented Interfaces:
org.bukkit.event.Listener
Listener class for handling NPC interactions with Citizens2.
-
Constructor Summary
ConstructorsConstructorDescriptionCitizensNPCInteractListener(Graves plugin, CitizensNPC citizensNPC) Constructs a new CitizensNPCInteractListener with the specified Graves and CitizensNPC instances. -
Method Summary
Modifier and TypeMethodDescriptionvoidonNPCLeftClick(net.citizensnpcs.api.event.NPCLeftClickEvent event) Handles NPC left-click interaction events.voidonNPCRightClick(net.citizensnpcs.api.event.NPCRightClickEvent event) Handles NPC right-click interaction events.
-
Constructor Details
-
CitizensNPCInteractListener
Constructs a new CitizensNPCInteractListener with the specified Graves and CitizensNPC instances.- Parameters:
plugin- The Graves instance to use.citizensNPC- The CitizensNPC instance to use.
-
-
Method Details
-
onNPCLeftClick
public void onNPCLeftClick(net.citizensnpcs.api.event.NPCLeftClickEvent event) Handles NPC left-click interaction events. If the player left-clicks an NPC associated with a grave, it cancels the event and opens the grave for the player.- Parameters:
event- The NPCLeftClickEvent to handle.
-
onNPCRightClick
public void onNPCRightClick(net.citizensnpcs.api.event.NPCRightClickEvent event) Handles NPC right-click interaction events. If the player right-clicks an NPC associated with a grave, it cancels the event and opens the grave for the player.- Parameters:
event- The NPCRightClickEvent to handle.
-