diff --git a/src/main/java/ch/njol/skript/aliases/ItemData.java b/src/main/java/ch/njol/skript/aliases/ItemData.java index 0f68279f43a..f18812aabb8 100644 --- a/src/main/java/ch/njol/skript/aliases/ItemData.java +++ b/src/main/java/ch/njol/skript/aliases/ItemData.java @@ -278,7 +278,7 @@ public boolean equals(final @Nullable Object obj) { return false; ItemData other = (ItemData) obj; - if (isAlias) { // This is alias, other item might not be + if (isAlias()) { // This is alias, other item might not be return other.matchAlias(this).isAtLeast(MatchQuality.SAME_ITEM); } else { // This is not alias, but other might be return matchAlias(other).isAtLeast(MatchQuality.SAME_ITEM); diff --git a/src/test/skript/tests/syntaxes/effects/EffEquip.sk b/src/test/skript/tests/syntaxes/effects/EffEquip.sk new file mode 100644 index 00000000000..a4a88a94f28 --- /dev/null +++ b/src/test/skript/tests/syntaxes/effects/EffEquip.sk @@ -0,0 +1,12 @@ +test "equip effect": + spawn a zombie at spawn of "world": + set {_entity} to event-entity + + equip {_entity} with a diamond chestplate + assert chestplate of {_entity} is a diamond chestplate with "entity was not wearing a diamond chestplate" + set chestplate of {_entity} to air + + equip {_entity} with a diamond chestplate named "Test" + assert chestplate of {_entity} is a diamond chestplate named "Test" with "entity was not wearing a named diamond chestplate" + + delete the entity within {_entity}