Promotion background
Halloween Season IS HERE!
10% off limited time offer!
limited time offer SAVE 10% NOW →
API API

Events

On this page, you will find every event the Phoenix NPCs API fires.

#Events

All of them are ordinary Bukkit events in com.phoenixplugins.phoenixnpcs.api.events, and each one carries the NPC with getNpc().

Event Fired when Also carries Cancellable
NpcInteractEvent A player clicks an NPC, after the cooldown check and before any action runs getPlayer(), getClick() (LEFT or RIGHT) Yes
NpcCreateEvent An NPC is created or copied No
NpcEditEvent A setting of an NPC changes getChange(), the name of what changed No
NpcRemoveEvent An NPC is removed No

Cancelling NpcInteractEvent stops the click: no action runs, no animation plays and the NPC does not start following.

@EventHandler
public void onNpcClick(NpcInteractEvent event) {
    if (event.getNpc().getTags().contains("event") && !eventRunning) {
        event.setCancelled(true);
        event.getPlayer().sendMessage("The event has not started yet.");
    }
}
Last updated about 2 hours ago
My Cart (0 items)

Oops... looks like the spiders padded through here

Add products to your cart and remove them from here Lets buy