Class NpcInteractListener
java.lang.Object
me.jay.GravesX.listener.integration.fancynpcs.NpcInteractListener
- All Implemented Interfaces:
org.bukkit.event.Listener
Listens for FancyNpcs interaction events and cancels the event if the player
interacts with an NPC associated with a grave.
-
Constructor Summary
ConstructorsConstructorDescriptionNpcInteractListener(Graves plugin) Constructs a new NpcInteractListener with the specified Graves instance. -
Method Summary
Modifier and TypeMethodDescriptionvoidonNpcInteraction(de.oliver.fancynpcs.api.events.NpcInteractEvent event) Handles NPC interaction events.
-
Constructor Details
-
NpcInteractListener
Constructs a new NpcInteractListener with the specified Graves instance.- Parameters:
plugin- The Graves instance to use.
-
-
Method Details
-
onNpcInteraction
public void onNpcInteraction(de.oliver.fancynpcs.api.events.NpcInteractEvent event) Handles NPC 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 NpcInteractEvent to handle.
-