π±οΈClick Events
π¨ CREATING GUIS
Click Events
Actions that execute when a player clicks an item in a GUI
Click events are actions that execute when a player clicks an item in a GUI. Each item can have multiple click events that execute in sequence.
π Quick Reference
Send a chat message
Run command as the player
Run command from console
Show a title/subtitle
Close the GUI
Add Vault money
Remove Vault money
Set Vault balance
Prompt for chat input
Pick player, run console cmd
Pick player, run player cmd
Pick offline player, run cmd
Give a custom item
Save player data fields
Remove items from inventory
Remove XP levels
Remove experience points
Reopen previous GUI
Play a sound
Go to next scene
Go to previous scene
Add enchant glow on scene open
Teleport the target player
Send to another server
Remove PlayerPoints
π Click Event Structure
Click events are defined inside an item's click-events map:
β Common Properties
Every click event supports these YAML properties:
clickType
String
NONE
Which mouse button triggers this event: LEFT, RIGHT, MIDDLE, SHIFT_LEFT, SHIFT_RIGHT, NONE (any click)
executionDelay
Number
0
Delay in ticks before this event executes (20 ticks = 1 second)
Note:
executionDelayis measured in ticks, not seconds. Use20for a 1-second delay,40for 2 seconds, etc.
The in-game editor also supports waitForCompletion (whether subsequent events wait for this one to finish) and openEvent (run on scene open instead of click). These are stored in the item's compressed data by the editor but are not directly configurable via hand-written YAML.
Example with click type restriction:
π± All Click Event Types
Message
ID: message
Sends a colored chat message to the player. Supports PlaceholderAPI placeholders.
Player Command
ID: command
Executes one or more commands as the clicking player.
The YAML field is commands (plural, list). A singular command key works for backwards compatibility.
commands
List
Commands to execute as the player
setOp
Boolean
When true, temporarily grants OP status to execute the command (default: false)
%player%
The clicking player's name
%executor%
The player who executed the action
Warning: Use
setOp: truewith caution. It temporarily grants the player full operator permissions to execute these commands.
Console Command
ID: console_command
Executes one or more commands from the server console.
Same as Player Command β uses commands (plural, list).
Title
ID: title-click-event
Sends a title and subtitle to the player with configurable fade times.
Format: title/?/subtitle/?/fadeIn/?/stay/?/fadeOut
The YAML field is title-format (not title).
title
1st
β
The main title text (required)
subtitle
2nd
empty
The subtitle text
fadeIn
3rd
20
Fade-in time in ticks
stay
4th
60
Stay time in ticks
fadeOut
5th
20
Fade-out time in ticks
Separate each parameter with /?/. Only the title is required β all other parameters are optional and use defaults if omitted.
Close Inventory
ID: close-inventory
Closes the player's currently open inventory.
Give Money
ID: money-give
Adds money to the player's account. Requires Vault.
The amount field supports PlaceholderAPI placeholders, e.g. amount: '%input%'.
Remove Money
ID: money-remove
Subtracts money from the player's account. Requires Vault.
Set Money
ID: money-set
Sets the player's account balance to an exact amount. Requires Vault.
Note: Unlike
money-giveandmoney-remove, theamountfield inmoney-setis a fixed number and does not support PlaceholderAPI placeholders.
Chat Fetcher
ID: chat-fetcher
Prompts the player to type input in chat. After input is received, nested click events are executed with access to the %input% placeholder.
See Chat Fetcher for full details.
Player Picker (Console Command)
ID: player-picker-by-console-command
Opens an online player selection GUI. When a player is selected, executes a console command.
%player% is replaced with the selected player's name.
Player Picker (Player Command)
ID: player-picker-by-player-command
Opens an online player selection GUI. When a player is selected, the clicking player executes a command.
Offline Player Picker
ID: offline-player-picker-command
Opens a player selection GUI that includes offline players. Runs as a console command.
Custom Item Give
ID: custom-item-give
Gives a custom configured item to the player. This click event stores items as serialized Bukkit ItemStack objects.
Tip: This is best configured through the in-game editor rather than by hand. The editor lets you place any item and it will be serialized automatically.
Save Player Info
ID: save-player-info
Saves data fields to the player's persistent data. Supports math operations.
Format: field1:value1,field2:value2
Math operators supported: +, -, *, /, ^ (exponentiation), and functions sqrt(), sin(), cos(), tan(). Parentheses are supported for grouping.
See Player Data for full details.
Take Item
ID: take-items
Removes specific items from the player's inventory. Items are stored as serialized Bukkit ItemStack objects.
Tip: This is best configured through the in-game editor. The editor lets you select which items to remove.
items
List
List of serialized Bukkit ItemStack objects to remove
ignoreDurability
Boolean
When true, ignores item durability when matching
Level Take
ID: level-required
Removes XP levels from the player.
The YAML field is level (singular, not levels).
XP Take
ID: xp-take
Removes experience points (not levels) from the player.
Open Last GUI
ID: back
Reopens the player's previously viewed GUI.
Sound
ID: sound-click-event
Plays a sound at the player's location.
sound
String
β
The Bukkit sound name
volume
Float
1.0
Volume of the sound
pitch
Float
1.0
Pitch of the sound
You can find all valid sound names in the Bukkit Sound enum.
Next Scene
ID: next-scene-click
Navigates to the next scene in the GUI.
See Scenes for multi-page navigation.
Previous Scene
ID: previous-scene-click
Navigates to the previous scene in the GUI.
Glow At Item
ID: glow-at-item
Adds an enchanted glow effect to the item when the scene opens. This is an open event β it runs automatically when the scene is displayed, not when the player clicks. The glow is tracked per-player, so each player sees it independently.
Note: This event is configured through the in-game editor. It automatically sets
openEvent: trueinternally and can be combined with conditions to glow only for certain players.
Teleport
ID: teleport
Teleports the target player to a specific location. In normal use the target is the clicking player, but when used with a player picker, the selected player is teleported instead.
Supported formats:
world,x,y,z,yaw,pitch
world,0,100,0,90,0
Full location with rotation
world,x,y,z
world,0,100,0
Location without rotation
x,y,z,yaw,pitch
0,100,0,90,0
Coordinates in player's current world
x,y,z
0,100,0
Coordinates in player's current world
world
world_nether
Teleport to a world's spawn point
current
current
Current location (useful with PlaceholderAPI)
Tip: Use
currentwith PlaceholderAPI to create dynamic teleport destinations, or use a world name to send players to a world's spawn.
Server (BungeeCord)
ID: server-click-event
Sends the player to another server on your BungeeCord/Velocity network.
See BungeeCord Support.
Player Points Remove
ID: player-points-remove
Subtracts PlayerPoints currency from the player. Requires the PlayerPoints plugin.
π Combining Multiple Click Events
Items can have multiple click events that execute in sequence:
π― Click Type Restrictions
Restrict events to specific mouse buttons by assigning unique keys:
Note: Each click event entry needs a unique key in YAML. If you need two events of the same type (e.g., two
messageevents), give them different keys likebuy-messageandinfo-message. The event type is determined by the internal structure, not the key name.
π Open Events
Some click events can run when the scene opens instead of on click. The glow-at-item event does this automatically. For other events, openEvent can be configured through the in-game editor β it is stored in the item's compressed data rather than as a direct YAML field.
Scenes also support their own open-events section β see Scenes for details.
Last updated