Fixed an issue with stats not being compatible with item types

This commit is contained in:
Indyuce 2020-08-09 21:46:46 +02:00
parent bd84656c4a
commit c9738bfbc0

View File

@ -432,7 +432,7 @@ public abstract class ItemStat {
* @return If a certain item type is compatible with this item stat
*/
public boolean isCompatible(Type type) {
String lower = getId().toLowerCase();
String lower = type.getId().toLowerCase();
return type.isSubtype() ? isCompatible(type.getParent())
: !compatibleTypes.contains("!" + lower) && (compatibleTypes.contains("all") || compatibleTypes.contains(lower)
|| compatibleTypes.contains(type.getItemSet().getName().toLowerCase()));