TMDevelopmentTinulica & Maiky

Actions and checks

Actions and checks

Used in actions of menu items, commands/actions of products and in drops.yml.

Actions

ActionExample
[open] <menu>[open] ranksopen a menu ([back] in it comes back here)
[back][back]menu it came from, or close
[close][close]close the menu
[refresh][refresh]redraw the menu
[console] <cmd>[console] give {player} diamond 1command from the console
[player] <cmd>[player] spawncommand as the player
[chat] <text>[chat] hellothe player writes in chat
[message] <text>[message] &aThanks!message to the player
[broadcast] <text>[broadcast] {player} bought VIP!message to everyone
[actionbar] <text>[actionbar] &a+10 tokensaction bar
[title] title;subtitle;in;stay;out[title] &aThanks;&7enjoy;0.5;2;0.5title (times in seconds)
[sound] <sound> [volume] [pitch][sound] ENTITY_PLAYER_LEVELUP 1 1.5sound
[effect] <effect> [seconds] [level][effect] SPEED 30 2potion effect
[bossbar] text;seconds;COLOR;STYLE[bossbar] &dSale!;10;PURPLE;SOLIDboss bar (1.9+)
[delay] <ticks>[delay] 20wait (20 ticks = 1 second) before the next actions
[buy(tokens)] <amount>[buy(tokens)] 100pay tokens, stop if not enough
[buy(money)] <amount>[buy(money)] 500pay money (Vault), stop if not enough
[tokens_give] / [tokens_remove] / [tokens_set][tokens_give] 1-10change the tokens of the player
[money_give] / [money_remove] / [money_set][money_give] 100change the money (Vault)
[server] <name>[server] survivalsend to another server (BungeeCord / Velocity)

Checks

Check
[has_tokens] 100at least 100 tokens
[has_money] 100at least 100 money (Vault)
[has_permission] nodehas a permission
[expression] a >= bcompare numbers or texts: == != > < >= <= equalsignorecase

Put ! in front to reverse a check: [!has_permission] group.vip, [!has_tokens] 100.

A check alone in a list of actions stops the rest when false. For more choices use a block:

actions:
  - if
  - "[has_tokens] 500"
  - do
  - "[message] &aYou are rich!"
  - else
  - "[message] &7Keep playing!"
  - end

The 3.x forms (check(expression;a;op;b), check(permission,node)...) still work.

Last updated 25 October 2026