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

Click Actions

On this page, you will find how to make an NPC do something when a player clicks it.

circle-info

The actions are saved in the NPC's own file in the npcs folder.

#Click Actions

Every NPC has three lists of actions:

List Runs on
Left Click Actions A left click, or a hit.
Right Click Actions A right click.
Any Click Actions Every click, after the left or right click actions.

The editor adds actions through the action builder, which asks for each field of the type you pick. Clicks with the off hand are ignored.

#What Stops a Click

  • The NPC is disabled, or the player cannot see it.
  • The player is still in the click cooldown.
  • Block While Running is on and the player's last actions are still running.
  • Another plugin cancels the click through the API.

A [PERMISSION] or [CONDITION] action stops the rest of its own list for players who fail it. The other list still runs.

#Commands

/pnpc action <id> <click> <add|remove|clear|list> [action] does the same as the editor. <click> is left, right, any or proximity, the last one for proximity actions.

Command Does
/pnpc action guide right add MESSAGE Hello %player% Adds [MESSAGE] Hello %player% to the end of the list.
/pnpc action guide right remove 2 Removes the second action.
/pnpc action guide right list Lists the actions with their numbers.
/pnpc action guide right clear Empties the list.
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