-
Notifications
You must be signed in to change notification settings - Fork 17
Placeholders
Placeholders are special text fields that will be replaced by their correspondence, which are calculated dynamically.
For example, placeholder %player%
will be replaced with
player's name. You can use it in the MESSAGE action: MESSAGE=%player% hello!
Here is list of placeholders (all placeholders starts and ends with symbol "%"):
Placeholder | Description |
---|---|
%TIME_SERVER% %TIME_SERVER:<TimeFormat>%
|
Server time. You can use additional parameter to define time format.%TIME_SERVER:HH:mm:ss% will show only hours-minutes-seconds (example: 10:59:44)Time formater parameters defined here |
%TIME_INGAME% |
In-game time in player's world. If there's no player defined at activator will show ingame time of first world. |
%PLAYER_LOC% |
Player current locations |
%PLAYER_LOC_EYE% |
Player eye (head) location |
%PLAYER_LOC_VIEW% |
Location of view-point |
%PLAYER_NAME% |
Player's name |
%PLAYER_DISPLAY% |
Player's "display" name |
%HEALTH% |
Health value |
%PLAYER_LOC_DEATH% |
Last death location |
%TARGET_PLAYER% |
Target player name. Used in some activators. |
%MONEY% %MONEY.<world>% %MONEY.<world>.<currency>%
|
Player's account value |
%RANDOM:<number>% %RANDOM:<min>-<max>% %RANDOM:<value1>,<value2> [,...,<valueN>]%
|
Random number or one of provided random strings. Example: %RANDOM:100% — will return integer value between 0 and 100%RANDOM:100-200% — will return integer value between 100 and 200%RANDOM:hello,hi,good day% — will return one of sub-string divided by "," |
%CALC:<expression>% |
Calculate expression. Example: %CALC:1+2% will be replaced with "3".You can also use variables inside this placeholder: %CALC:1+x+z% Supported features: · Basic math operators (^ * × · / ÷ % + -). · Explicit precedence with parenthesis. · Implicit multiplication of bracketed subexpressions. · Correct right-associativity of exponentials (power operator). · Direct support for hexadecimal numbers prefixed by 0x. |
%PLAYER_ITEM_HAND% |
Text representation of item that player holds in hand. |
%PLAYER_INV:<Slot>% |
Text representation of item located in provided slot. could be a number of slot in player inventory (0...35). Or a name of player equipment slot: helmet, chestplate, leggings, boots, hand. Example: %player_inv:10% — item in slot No.10%player_inv:helmet% — player's helmet%player_inv:hand% — item in player's hand
|
%raw:<%AnotherPlaceHolder%>% |
This placeholder is prevent of changing content of the nested placeholder. It will return nested placeholder instead of the value. Example: Action MESSAGE %var:test% %raw:%var:test%% will show show value of the test variable in first position and %var:test% in second. |
Any variable could be used as placeholder.
You just need to use construction: %var:<VariableId>%
for global variables and %varp:<VariableId>%
for personal variables. You can also point to variable of any players using placeholder: %var:<Player>.<VariableId>%
Some activators, actions or flags provides additional local (temporary) placeholders, that could be used only during execution of the activator.
In addition all flags are... also could be used as placeholders. Just add "_flag" to flag's name and you'll get a flag-placeholder. For example, placeholder %time_flag% will replaced with values of flag TIME
if this flag is used in activator.
If you need to get flag check result you must use placeholder <flag_name>_flag_val
, that will return true or false.
If you use plugin PlaceholderAPI on your server you can use placeholders provided by this plugin in any activators, actions or flags.
There are some placeholder that could be used only in command line when you add new actions, flags or activators. This kind of placeholders created to made editing process easy.
For example, you can type command /react add activator action TP %here%
instead of typing full location including world name and coordinates.
Placeholder | Usage (placeholder and aliases) | Description |
---|---|---|
Player location | %here% |
This placeholder will be replaced with full player location (including pitch and yaw) |
Player eye (or head) location |
%eye% %head%
|
This placeholder will be replaced with location of player head (including view direction - pitch and yaw) |
Target block location |
%view% %viewpoint%
|
Location of block that is pointed by cursor. |
Selected block location |
%selection% %select% %sel%
|
Location of block that was selected using /react select command.You must point your cursor to required block, type command /react select . Than you will be able to use %select% placeholder in parameters of the /react add command. |
Links:
Download | Support | Twitter | VK | MinecraftMain Blog
© 2017, fromgate
http://reactions.fromgate.me
http://reactions.fromgate.ru
- Commands and Permission
- Activators
- Flags
- Actions
- Timers
- Menus
- Data formats
- Configuration
- Команды и пермишены
- Активаторы
- Флаги
- Действия
- Таймеры
- Меню
- Форматы данных
- Конфигурация