-
Notifications
You must be signed in to change notification settings - Fork 3
Click Handlers
The click-handler lets you add different actions to an item to execute commands/events.
Do you want to make a condition if someone clicks an item with the left button, and another condition with shift + right click, you can do it! Just add multiple conditions, every one is called, and the ones passed will execute the commands!
Items:
<UNIQUEID>:
Click-Handlers:
<UNIQUEID>:
Click-Type: 'left, right, middle'
Shift: false
Server: 'Lobby'
Commands:
- 'message: &7You clicked me!'
Close: true
Arguments: []- Commands
- Click-Type
- Shift
- Close
- Permission
- Permission-Message
- Server
- Server-Message
- Delay
- Delay-Message
- Price
- Price-Message
- Points
- Points-Message
- Experience
- Experience-Message
- Items
- Items-Message
- Items-Take
- Give
- Give-Message
- Sound
- Arguments
| Type | Supports Placeholders? |
|---|---|
| StringList | Yes |
List of commands that will be performed once a click-handler has passed successfully.
You can use the following formats, to perform different actions:
-
player: <command>Runs a command as a player (Default) -
console: <command>Runs a command as a console -
op: <command>Execute a command as an operator -
chat: <message>Makes the player send a chat message -
menu: <Menu without .yml> [arguments]Opens another menu without using/acm open <menu> [arguments](Supports arguments!) -
server: <servername>Sends a player to another server on BungeeCord -
broadcast: <message>Send a message to all player -
give: <item>Gives a item to the player (Format:<ItemName/Number>:[data]:[amount]) -
tellraw: <json message>Sends a json-message to the player -
tellallraw: <json message>Sends a json-message to all players -
banner: <banner-pattern>Give a banner with a specified Banner-Pattern -
title:Display a title message to the player (Format:<message> {in:#,out:#,stay:#}# = ticks) use/nto create a subtitle -
titleall:Display a title message to all online players -
(In Progress)actionbar:Display an action bar message to the player
Special Placeholders:
-
{delay:<ticks>}Delays the command you are trying to do by the amount of ticks defined! (Used anywhere in a command)
Examples:
Commands:
- 'message: &aWarping to &6Spawn&a in 5 seconds!'
- 'player: warp spawn {delay: 100}' #Will delay the command by 100 ticks, or 5 seconds!
- 'message: &aCongratulations %player_name% you have been teleported to &6Spawn! {delay:110}'| Type | Supports Placeholders? | Default |
|---|---|---|
| Node | No | All |
The way the player must click on a item to perform the action(s).
These can all be combined using commas (ex: 'left, right, middle')
Valid Nodes:
-
left: Player must left click -
right: Player must right click -
middle: Player must middle click
| Type | Supports Placeholders? | Default |
|---|---|---|
| Boolean | No | None |
Specifies if the click-handler needs shift to be pressed to perform the action.
| Type | Supports Placeholders? | Default |
|---|---|---|
| Node | No | False |
Choose if the menu should be closed after clicking on the item.
Valid Nodes:
-
truewill close the menu after the player clicks -
falsewill not close the menu -
onsuccesswill close if the click-handler was successfully passed
| Type | Supports Placeholders? |
|---|---|
| String/StringList | Yes |
Set one or more permissions that the player needs to have to perform the action(s).
Use a - in front to require NOT having the permission (ex: -some.permission)
Example:
# One Permission
Permission: 'advancedcustommenu.awesome'
# Multiple
Permission:
- 'advancedcustommenu.awesome'
- '-advancedcustommenu.lame'| Type | Supports Placeholders? | Needs | Default |
|---|---|---|---|
| String, StringList | Yes | Permission | Language No-Permission:
|
Sends a message if the player doesn't have the required permission.
Special Placeholders:
-
%permission%: Returns the permission needed
| Type | Supports Placeholders? |
|---|---|
| String, StringList | No |
Set one or more permissions servers that the player needs to be on to allow this click-handler
Example:
# One Server
Server: 'Lobby'
# Multiple allowed Servers
Server:
- 'Lobby'
- 'Survival'| Type | Supports Placeholders? | Needs | Default |
|---|---|---|---|
| String, StringList | Yes | Server | Language Server:
|
Sends a message if this server is click-handler cannot perform in the server specified
| Type | Supports Placeholders? | Default |
|---|---|---|
| Integer | No | 0 |
Set a delay (cooldown) to when an item is allowed to be clicked again.
Saves over restarts, reloads and join/leave events.
This section will generate a new file named "delays.yml"
| Type | Supports Placeholders? | Needs | Default |
|---|---|---|---|
| StringList | Yes | Delay | Language Delay:
|
Set the message when the cooldown is still active.
Special Placeholders:
-
{hoursleft}: Returns the amount of hours left -
{minutesleft}: Returns the amount of minutes left -
{secondsleft}: Returns the amount of seconds left
| Type | Supports Placeholders? | Required Dependencies |
|---|---|---|
| Integer | Yes | Vault + an Economy-plugin |
Set the price that the player needs to pay to perform the action(s).
| Type | Supports Placeholders? | Needs | Default |
|---|---|---|---|
| StringList | Yes | Price | Language Price:
|
Set a custom message when the player doesn't have enough currency.
Special Placeholders:
-
%price%: Returns the vault currency needed to purchase
| Type | Supports Placeholders? | Required Dependencies |
|---|---|---|
| Integer | Yes | PlayerPoints |
Set the amount of points that the player needs to pay to perform the action(s).
| Type | Supports Placeholders? | Needs | Default |
|---|---|---|---|
| StringList | Yes | Points | Language Points:
|
Set a custom message when the player doesn't have enough points.
Special Placeholders:
-
%points%: Returns the points needed to purchase
| Type | Supports Placeholders? | Added |
|---|---|---|
| Integer | No | 3.4.0 |
Set a amount of experience levels that the player needs to pay to perform the action(s)!
| Type | Supports Placeholders? | Needs | Default |
|---|---|---|---|
| StringList | Yes | Experience | Language Experience:
|
Set a custom message if the player doesn't have enough experience levels.
Special Placeholders:
-
%experience%: Returns the amount of experience levels needed
| Type | Supports Placeholders? | Added |
|---|---|---|
| String/StringList | No | 3.4.0 |
Set the item(s) the player needs to have to perform the action(s)!
| Type | Supports Placeholders? | Needs | Default |
|---|---|---|---|
| String/StringList | Yes | Items | Config Items:
|
Set a custom message if the player doesn't have an item.
Special Placeholders:
-
%item%: Returns the first item type the player doesnt have (ex:Stone) -
%item-amount%: Returns the amount of the item (ex:5)
| Type | Supports Placeholders? | Needs | Default |
|---|---|---|---|
| Boolean | No | Items | False |
Set whether or not to take the required item(s).
| Type | Supports Placeholders? | Added |
|---|---|---|
| String/StringList | No | 4.1.0 |
Set the item(s) to SAFELY give a player, if not enough space it will not perform the action(s)!
| Type | Supports Placeholders? | Needs | Default |
|---|---|---|---|
| String/StringList | Yes | Give | Language Give:
|
Set a custom message if the player doesn't have enough space in their inventory.
| Type | Supports Placeholders? |
|---|---|
| String/Section | No |
Plays a sound everytime the item is clicked
Format: <sound>:[volume]:[pitch]
Sounds for 1.8 can be found on GitHub
1.9+ Sounds can be found on Spigot
This can also be a section to indicate advanced sounds
-
Plays a sound everytime the item is clicked
-
Plays a sound if the click-handler passed
-
Plays a sound if the click-handler failed
Example:
# Basic Sound
Sound: 'BLOCK_ANVIL_BREAK:1:1'
# Advanced Sounds
Sound:
Basic: 'BLOCK_ANVIL_BREAK:1:1'
Success: 'BLOCK_NOTE_BELL:0.5'
Failed: 'BLOCK_STONE_BUTTON_CLICK_ON'| Type | Added |
|---|---|
| Key Section | 4.2.0 |
Learn how to check for conditions being met with Arguments!
Chat with us on Discord
Have a Suggestion? Make an issue!
Thank you for viewing the Wiki for AdvancedCustomMenu!
Did this wiki help you out? Please give it a Star so I know it's getting use!
Check out my other plugins!