mirror of
https://gitlab.com/phoenix-dvpmt/mmoitems.git
synced 2024-12-23 04:47:34 +01:00
Fixed Crafting Station Placeholder Condition
- `=`s cannot be used as comparators. Instead replace them with a `+` For example, `placeholder{placeholder=%mmocore_profession_mining%~<+~20}` is less than or equal to `placeholder{placeholder=%mmocore_profession_mining%~+~20}` is equal to If using `+` gives you incorrect results when attempting to see if something is equal (Says that it is not equal, even though it is), use `equals` instead. Greater than or equal to & Less than or equal to, should NOT have incorrect results, only direct `+` equal to comparisons may. So if `placeholder{placeholder=%mmocore_profession_mining%~++~20}` result is incorrect, then use `placeholder{placeholder=%mmocore_profession_mining%~equals~20}` instead.
This commit is contained in:
parent
e174d501e9
commit
14cbbcad15
@ -27,16 +27,16 @@ public class PlaceholderCondition extends Condition {
|
||||
switch (comparator) {
|
||||
case "<":
|
||||
return Double.valueOf(placeholders) < Double.valueOf(compareTo);
|
||||
case "<=":
|
||||
case "<+":
|
||||
return Double.valueOf(placeholders) <= Double.valueOf(compareTo);
|
||||
case ">":
|
||||
return Double.valueOf(placeholders) > Double.valueOf(compareTo);
|
||||
case ">=":
|
||||
case ">+":
|
||||
return Double.valueOf(placeholders) >= Double.valueOf(compareTo);
|
||||
case "==":
|
||||
case "=":
|
||||
case "++":
|
||||
case "+":
|
||||
return Double.valueOf(placeholders) == Double.valueOf(compareTo);
|
||||
case "!=":
|
||||
case "!+":
|
||||
return Double.valueOf(placeholders) != Double.valueOf(compareTo);
|
||||
case "equals":
|
||||
return placeholders.equals(compareTo);
|
||||
|
Loading…
Reference in New Issue
Block a user