Class CitizensNPCInteractListener

java.lang.Object
dev.cwhead.GravesX.listener.integration.citizensnpcs.CitizensNPCInteractListener
All Implemented Interfaces:
org.bukkit.event.Listener

public class CitizensNPCInteractListener extends Object implements org.bukkit.event.Listener
Listener class for handling NPC interactions with Citizens2.
  • Constructor Details

    • CitizensNPCInteractListener

      public CitizensNPCInteractListener(Graves plugin, CitizensNPC citizensNPC)
      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.