Feature Request: Compare Condition
Summary
it would be incredibly useful to have a compare condition
Usage
instead of having to set a placeholder to a variable first one can take the output of a placeholder, either internal or external and compare it to another value.
Another usecase would be to allow math in both values, so one can do relative complex computations with values.
Value
the times I get asked about StringEquals{value1=%placeholder%;value2=><number>}
is quite high, to have an actual build in solution would help the community.
Other examples would be more mathy
Priority
Medium, since it should be easy to implement, theoretically
Implementation
the final condition could look like:
- compare{value1=<number/placeholder/math>;compare=<Greater/GreaterEqual/Lower/LowerEqual/Equal/NotEqual>;value2=<number/placeholder/math>
example:
- compare{value1=%server_online%;compare=GreaterEqual;value2=1/3*%bungee_total%}
will return true if the amount of players on the server are more or equal to 1/3th of the total players on the network.