Class NpcInteractListener

java.lang.Object
me.jay.GravesX.listener.integration.fancynpcs.NpcInteractListener
All Implemented Interfaces:
org.bukkit.event.Listener

public class NpcInteractListener extends Object implements 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 Details

    • NpcInteractListener

      public NpcInteractListener(Graves plugin)
      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.