Closed UsainSrht closed 1 year ago
Yes, I also encountered this bug, I solved it in the same way as the author
This occurs because Skript parses the input as if {_ice} is ((Material.ICE or Material).STONE)
(i.e. gets the STONE
field of Material.ICE or MATERIAL
). You can add parentheses as such: (Material.ICE) and (Material.STONE)
.
I don't think I can / should do anything about this. Although it doesn't make much sense with the context of Material class and these fields, in general this could be desired.
Same in terms of the Skript side of this, I don't think the parser should be changed. It currently prefers a single expression over a list of expressions, which causes this behaviour.
Describe the bug When you try to compare an object with more than one java objects condition fails.
To reproduce
Expected behavior Using javaobjects with skript's conditions properly.
Server information
Additional context I know you can simply replace
if {_ice} is (Material.ICE or Material.STONE):
withif (Material.ICE and Material.STONE) contains {_ice}:
but that's totally different condition.