Version: 0.7.0
Value Placeholder Fact
A fact that is computed from a placeholder.
This placeholder is evaluated when the fact is read and can return anything.
The value will be computed based on the values
specified.
This fact can only be read, not written to. Hence, it is only suitable for criteria.
How could this be used?
If you only want to run certain actions if the player is in creative mode. Or depending on the weather, change the dialogue of the NPC.
Fields
Comment
InheritedOptionalA comment to keep track of what this fact is used for.
Group
RequiredPlaceholder
RequiredPlaceholdersPlaceholder to parse (e.g. %player_gamemode%
Placeholders from the
PlaceholderApi
can be used. So for example, you can use %player_name%
for the player name.Values
RequiredRegexThe values to match the placeholder with and their corresponding fact value.
An example would be:
values:
SURVIVAL: 0
CREATIVE: 1
ADVENTURE: 2
SPECTATOR: 3
If the placeholder returns CREATIVE
, the fact value will be 1
.
If no value matches, the fact value will be 0
.
Values can have placeholders inside them.