Improve item type comparison for MC 1.8, fixes #865

This commit is contained in:
PikaMug 2019-07-26 15:53:44 -04:00
parent 0dfe461b71
commit cfddb0ca1e

View File

@ -125,6 +125,7 @@ public class ItemUtil {
}
}
if (Material.getMaterial("LINGERING_POTION") == null) {
if (one.getType().equals(Material.POTION)) {
// Bukkit version is below 1.9
Potion pot1 = new Potion(one.getDurability());
Potion pot2 = new Potion(two.getDurability());
@ -135,6 +136,7 @@ public class ItemUtil {
return -9;
}
}
}
if (one.getEnchantments().equals(two.getEnchantments()) == false) {
return -5;
}