Placeholder for custom data
A placeholder that allows you to save, delete and obtain variables for players, coordinates and entities (in a file or temporarily).
Last updated
A placeholder that allows you to save, delete and obtain variables for players, coordinates and entities (in a file or temporarily).
Last updated
Allows you to save, delete and obtain variables for players, coordinates and entities (in a file or temporarily).
%CEP_customData_<action>_<name>_(semi-mandatory) <data>_(optional) <entity_uuid|player_name|world,x,y,z>%
<action> โ may be set, remove, get or getset, "getset" is needed to get a variable if it exists or set it if it does not exist, before the action you can write โtempโ (for example: "tempset"), then instead of perpetual variables temporary variables will be used, which will be stored until the server restarts; (MANDATORY)
<name> โ the name of the variable (do not use underscores); (MANDATORY)
<data> โ the data to save in the variable (only in case of "set" or "getset" actions); (SEMI-MANDATORY)
<entity_uuid | player_name | world,x,y,z> โ the target which own the variable (if no target is specified, a global variable will be used). (OPTIONAL)
Use "แต" symbol instead of underscores in <data>!
The perpetual variables and temporary variables are different! The same variables names will point to different variables.
You will get back the specified or saved data in any case, nevermind using the "get" or "set". In case of "remove" you will get "true" or "false" depending on the removing result. You can also use expansion from PlaceholderAPI and its "%string_substring_<startIndex>,<endIndex>_<string>%" placeholder to trim your data placeholder to the zero characters if you do not want to get the data back.
If "temp" prefix will not be specified in the action, the variable will be stored in a file at the path plugins/TriggerReactor/var.json (you can change this file, changes will take effect after the command /trg reload confirm), otherwise the variable will be stored in the server memory until it is restarted.
Can be useful in many cases to save, change, delete and obtain different data for different objects in a comfortable way. It can be used in many different systems and mini-games.
%CEP_customData_set_coins_2_{player}% # Set some "coins" data to "2" for the current player
%CEP_customData_tempgetset_taxes_100_world,643,54,1542% # Set temporary variabe as some "taxes" data if it does not exist to "100" or get the current value otherwise for some block at the location