Skip to content
Andre_601 edited this page Nov 29, 2017 · 4 revisions

The click-handler lets you add different actions/commands to a item.

Example:

Click-Handler:
  <UNIQUEID>:
    Click-Type: 'left, right, middle'
    Shift: false
    Commands:
    - 'message: &7You clicked me!'
    Close: true

Summary

<UNIQUEID>

Required? Type Supports Placeholders?
Yes String No

Same like <UNIQUEID> in the Items-page.
Make sure to use ' ' if you only use numbers.

If you want use different actions for different clicks (See Click-Type for infos), you need to make a new unique-id.


Click-Type

Required? Type Supports Placeholders?
No String No

Choose a click-type, that the player must click on a item, to perform the action.
If this option isn't set, then the plugin will accept all click-types

You can use:

  • Left: Player must left click
  • Right: Player must right click
  • Middle: Player must middle click (mouse wheel)

Shift

Required? Type Supports Placeholders?
No Boolean No

Specifies whenever the handler needs a shift click, to perform the action.


Commands

Required? Type Supports Placeholders?
Yes Stringlist Yes

List of commands, that will be performed once a click-handler passed successfully.
You can use placeholders inside the commands.

The entered text will be run as a player-command by default.
You can use the following formats, to perform different actions:

  • 'menu: <Menu name without .yml>' Opens another menu without using /acm open <menu>
  • 'server: ' Sends a player to another server on the BungeeCord
  • 'player: ' Runs a command as a player (Default)
  • 'console: ' Runs a command as a console
  • 'chat: Makes the player send a chat message
  • 'broadcast: ' Broadcast a message on the server
  • 'give: ' Gives a item to the player
  • 'op: ' Lets the player execute a command as an operator
  • 'tellraw: ' Sends a json-message
  • 'tellallraw: ' Sends a json-message to all online players
  • 'banner: ' Give a banner with the specified Banner-pattern

Close

Required? Type Supports Placeholders?
No Boolean No

Choose, if the menu should be closed after clicking on the item.


Price

Required? Type Supports Placeholders? Needs
No Integer Yes Vault + a Economy-plugin

Set a price that the player needs to pay, to perform the action(s).


Price-Message

Required? Type Supports Placeholders? Needs Default
No Stringlist Yes A price set Config-message

Sends a message, if the player doesn't have enouth money.
%price% will display the price to pay.


Points

Required? Type Supports Placeholders? Needs
No Integer Yes PlayerPoints

Set a amount of points that the player needs to pay, to perform the action(s).


Points-Message

Required? Type Supports Placeholders? Needs Default
No Stringlist Yes A price set Config-message

Sends a message, if the player doesn't have enouth points.
%points% will display the points to pay.


Experience

Required? Type Supports Placeholders?
No Float No

Set a amount of experience that the player needs to pay, to perform the action(s)!
You can use normal numbers for experience or add a L (example: 10L) for levels.


Experience-Message

Required? Type Supports Placeholders? Default
No Stringlist Yes Config-message

Sends a message, if the player doesn't have enouth experience.
%experience% will display the experience to pay.


Permission

Required? Type Supports Placeholders?
No String Yes

Set a permission, that the player need to have, to perform the action(s).
Use a - in fron of the permission to NOT require it. (Example: -some.permission)


Permission-Message

Required? Type Supports Placeholders? Default
No Stringlist Yes Default "No Permission" message

Sends a message, if the player doesn't have the required permission.


Delay

Required? Type Supports Placeholders?
No Integer No

Set a delay (cooldown) for clicking on the item.


Delay-Message

Required? Type Supports Placeholders?
No Stringlist Yes

Sends a message, if the cooldown is still active.

You can use the following special placeholders in the message:

  • {hoursleft}: Returns the amount of hours left
  • {minutesleft}: Returns the amount of minutes left
  • {secondsleft}: Returns the amount of seconds left

Sounds

Required? Type Supports Placeholders?
No Key list No

Plays a sound under specific circumstances.
The format is [Sound]:<volume>:<pitch>

Volume and Pitch can be a double (Example: 0.3 or 0.7)

1.9+ Sounds can be found here!
Sounds for 1.8 can be found here!

There are three different types:

  • Basic: Plays the sound on every click
  • Success: Plays the sound, if the click-handlers where successful
  • Failed: Plays the sound, if the click-handler has failes

Clone this wiki locally