Docs

Actions

An action is a line that starts with a type in brackets. Every reward and effect list uses the same format: levels, milestones, masteries, boosters, abilities, placeables, AFK blocks, custom enchants and menus.

yaml
rewards:
  - "[give] tokens 5000"
  - "[title] &6&lLEVEL 10;&7You earned 5,000 tokens"
  - "[chance=10] [give] gems 5"
  - "[delay=40] [sound] ENTITY_PLAYER_LEVELUP 1 1.2"
  - "[permission=rank.vip] [console] crate key give {player} vip 1"

Types

ActionArgumentExample
[message]Text for the player[message] &aWell done
[broadcast]Text for everyone[broadcast] &b{player} &7reached level 50
[console]Command as console, without /[console] lp user {player} parent add vip
[player]Command as the player[player] spawn
[actionbar]Action bar text[actionbar] &e+500 tokens
[title]title;subtitle;fade-in;stay;fade-out (times in ticks, optional)[title] &6WOW;&7subtitle;10;40;10
[sound]SOUND [volume] [pitch][sound] UI_TOAST_CHALLENGE_COMPLETE 1 1
[effect]EFFECT [ticks] [level][effect] HASTE 200 2
[give]<currency> <amount>[give] shards 25
[take]<currency> <amount>[take] tokens 1K
[exp]<track> <amount> from levels.yml[exp] mining 500
[close]Nothing, closes the inventory[close]

Addons can register new types, for example [crate], that work in every list. See Extending PulsePrison.

Prefixes

They go before the type and can be combined:

PrefixDoes
[chance=25]Runs with a 25% chance
[delay=20]Waits 20 ticks (1 second)
[permission=node]Only if the player has the permission

Placeholders

  • {player} and {uuid} in every action.
  • Each system adds its own: {level} and {track} in levels, {milestone} in milestones, {enchant} in masteries, {blocks} and {money} in placeables. They are listed at the top of each file.
  • With PlaceholderAPI, any %placeholder%.

Translated texts

If the argument is only a message key starting with @, the text in the player's language is used:

yaml
- "[message] @milestones.custom-reward"
- "[broadcast] @placeables.items.nuke-broadcast"

[broadcast] with a key sends every online player the text in their own language.

Menus also accept close, back, refresh, page-next, page-previous, open-menu <menu>, message, player, console and sound without brackets, plus each menu's own actions. See Menus.

Actions | PulsePrison Core Docs