🧮 Score Variables
Since SCore variable placeholders are supported by PlaceholderAPI, you can use the SCore variables like this:
%math_{score_variables_userLevel}*10%
Score (Global variables)
Score has a integration of variables where you can store strings/numbers in variables in a global way or per player, they aren't integrated in EI or EB, but they are integrated as commands (so they can be used in combination with EI / EB)
They are stored in plugins/Score/variables
Types of Score variables
Type | Explanation |
---|---|
GLOBAL | Variable stored in a global way, that means, if this variable is parsed with one player it will get the same value as it would be parsed with another player. |
PLAYER | Variable stored for each player, that means, the value is different per player, so parsing this variable with one player can have a different value with another player |
Variables modification
Type | Explanation |
---|---|
SET | You set a static value to the variable |
MODIFICATION | You modify the variable (useful for INT variables, to add value to a integer value, or to substract a certain value) |
Variables tools
/score variables list
/score variables info {var_name} [player]
/score variables-create {var_name}
/score variables-delete {var_name}
/score variables
/score variables clear {typeofvariable} {nameofvariable} [player]
/score variables <typeofmodification> <typeofvariable> <nameofvariable> <value> [player]
Examples:
GLOBAL Variables:
/score variables SET GLOBAL thisisthenameofthevariable 100
/score variables MODIFICATION GLOBAL thisisthenameofthevariable 100
PLAYER Variables
/score variables SET PLAYER myvariable -50 Ssomar
/score variables MODIFICATION PLAYER myvariable -50 Ssomar
Variables placeholders
This requires PlaceholderAPI.
%score_variables_<var_name>%
%score_variables_<var_name>_int%
Name of the variables can't have underscores -> "
If you want to set a variable a value with spaces, such as value: "This is my variable", we suggest you to:
1) Don't use spaces, just write "_" instead of " " so the variable name would be "This_is_my_variable"
2) If you really need the spaces you can use the Formatter extension of PlaceholderAPI to remove certain letters, for example:
%formatter_text_replace_*_ _{score_variables_ThisIsTheNameOfMyVariable}%
Normally %score_variables_ThisIsTheNameOfMyVariable% would return HELLO_THERE, but with the Formatter placeholder the result is HELLO THERE .
Variable-List
This is a type of variable that is quite complex and have its own features, that's why it is separated, let's explain it
Create a variable
/score variables-create ThisIsTheNameOfMyVariable
Add values into the list
/score variables list-add PLAYER ThisIsTheNameOfMyVariable TEXT1 Ssomar
/score variables list-add PLAYER ThisIsTheNameOfMyVariable TEXT2 Ssomar
To specify a place to add the value into the list use index feature
/score variables list-add PLAYER ThisIsTheNameOfMyVariable TEXT3 Ssomar index:0
To see the modification
/score variables info ThisIsTheNameOfMyVariable
Removing values:
Remove the last value
/score variables list-remove PLAYER ThisIsTheNameOfMyVariable Ssomar
Remove a specific index
/score variables list-remove PLAYER ThisIsTheNameOfMyVariable Ssomar index:0
Remove a specific value
/score variables list-remove PLAYER ThisIsTheNameOfMyVariable Ssomar value:Test
Variable-list also work with GLOBAL variables, but you would need to change instead of PLAYER -> GLOBAL and remove the player in the command
Variable-List Placeholders
Placeholder | |
---|---|
%score_variables_<variable-name>_<index>% | Return the value at the specific index of the list |
%score_variables_<variable-name>% | returns all the elements of the list |
%score_variables-contains_<variable-name>_<value>% | Boolean to see if the list contains a value (true or false) |
%score_variables-size_<variable-name>% | Returns the size of the list |
What you can do with this feature -> Item created by Ssomar
ExecutableItems (Item variables)
ExecutableItems has a integration of variables where you can store strings/numbers/list in variables inside the item. With them you can create multiple mechanics in your items.
To check the placeholders of "Internal item variables" check it here
📚PlaceholdersExecutableBlocks (Block variables)
ExecutableBlocks has a integration of variables where you can store strings/numbers/list in variables inside the block. With them you can create multiple mechanics in your blocks.
To check the placeholders of "Internal item/block variables" check it here
📚PlaceholdersLast updated