Examples
ConditionalEvents example
You can detect changes in variables using my plugin ConditionalEvents, check for conditions and execute whatever action you want. Just create an event like this:
Events:
event:
type: custom
custom_event_data:
event: svar.ajneb97.api.VariableChangeEvent
player_variable: getPlayer()
variables_to_capture:
- '%variable_type%;getVariable().getVariableType()'
- '%variable_name%;getVariable().getName()'
- '%new_value%;getNewValue()'
conditions:
- "%variable_name% == player_gems"
- "%new_value% <= 0"
actions:
default: []
Last updated