Click Events
Last updated
Last updated
Executed when player clicks the item. Multiple events can run in sequence:
Explaining Some Events:
message
: Sends a chat message or title (if using !@!
format) to the player.
command
: Runs a command. %player%
replaced with clicking player’s name. By default runs as console.
money-give
/money-remove
/money-set
: Adjust player balance. Requires Vault.
player-picker-command
: Open a player selection GUI, once a player chosen, executes command with %player%
as chosen player and %executor%
as the clicking player.
chat-fetcher
: Prompt the player to type something in chat. Input is stored in %input%
. Use conditions to validate input (is integer, has money, etc.). Subsequent events run if input is valid.
offline-player-picker-command
: Similar to player-picker but allows selecting offline players.
save-player-info
: Store persistent data keyed by infinitegui_player_info_
placeholders.
close-inventory
: Close the GUI.
Wait for Conditions to Pass: If conditions fail, the event chain stops. If a conditionFailMessage
is set at the item level, it’s shown to the player.
Events trigger on click. If multiple defined, they run in sequence:
message:
Sends a chat message to player. Supports !@!
format to send titles: "Title !@! subtitle !@! fadeIn !@! stay !@! fadeOut"
command:
Runs command as console. %player%
replaced with clicking player.
title:
Alternative method if using a different formatting. Or just message
with !@!
works.
money-give, money-remove, money-set:
Adjust player’s Vault balance.
player-picker-command:
Opens a GUI to pick a player. Once chosen, runs command with %player%
replaced by chosen player’s name and %executor%
by original player.
chat-fetcher:
Prompts player in chat. If conditions pass, run subsequent events.
offline-player-picker-command: Similar to player-picker-command
but also lists offline players.
save-player-info:
Edits persistent player data stored by InfiniteGUI. Useful for tracking custom variables.
close-inventory:
Closes the current GUI.
Note: %input%
placeholder is available after a chat-fetcher
event. %player%
always refers to the clicking player. %executor%
is used in events like player-picker-command
to differentiate between chosen player and the one who triggered the command.