mirror of
https://github.com/PikaMug/Quests.git
synced 2024-12-26 02:58:00 +01:00
Improve item type comparison for MC 1.8, fixes #865
This commit is contained in:
parent
0dfe461b71
commit
cfddb0ca1e
@ -125,14 +125,16 @@ public class ItemUtil {
|
||||
}
|
||||
}
|
||||
if (Material.getMaterial("LINGERING_POTION") == null) {
|
||||
// Bukkit version is below 1.9
|
||||
Potion pot1 = new Potion(one.getDurability());
|
||||
Potion pot2 = new Potion(two.getDurability());
|
||||
if (pot1.getType() == null || pot2.getType() == null) {
|
||||
return -9;
|
||||
}
|
||||
if (!pot1.getType().equals(pot2.getType())) {
|
||||
return -9;
|
||||
if (one.getType().equals(Material.POTION)) {
|
||||
// Bukkit version is below 1.9
|
||||
Potion pot1 = new Potion(one.getDurability());
|
||||
Potion pot2 = new Potion(two.getDurability());
|
||||
if (pot1.getType() == null || pot2.getType() == null) {
|
||||
return -9;
|
||||
}
|
||||
if (!pot1.getType().equals(pot2.getType())) {
|
||||
return -9;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (one.getEnchantments().equals(two.getEnchantments()) == false) {
|
||||
|
Loading…
Reference in New Issue
Block a user