Class NPCEvent

Direct Known Subclasses:
EntityTargetNPCEvent, HologramTrait.HologramRendererCreateEvent, NPCClickEvent, NPCCloneEvent, NPCCollisionEvent, NPCCombustEvent, NPCCommandDispatchEvent, NPCCreateEvent, NPCDamageEvent, NPCDeathEvent, NPCDespawnEvent, NPCKnockbackEvent, NPCLinkToPlayerEvent, NPCLookCloseChangeTargetEvent, NPCNeedsRespawnEvent, NPCOpenDoorEvent, NPCOpenGateEvent, NPCPistonPushEvent, NPCPushEvent, NPCRemoveEvent, NPCRenameEvent, NPCSeenByPlayerEvent, NPCSelectEvent, NPCSpawnEvent, NPCSpeechEvent, NPCTeleportEvent, NPCTraitCommandAttachEvent, NPCTraitCommandDetachEvent, NPCTraitEvent, NPCUnlinkFromPlayerEvent, NPCVehicleDamageEvent

public abstract class NPCEvent extends CitizensEvent
Represents an event thrown by an NPC.
  • Constructor Details

    • NPCEvent

      protected NPCEvent(NPC npc)
    • NPCEvent

      protected NPCEvent(NPC npc, boolean async)
  • Method Details

    • getNPC

      public NPC getNPC()
      Get the npc involved in the event.
      Returns:
      the npc involved in the event