mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-21 18:15:32 +01:00
Null check base potion data, fixes #2302
This commit is contained in:
parent
318f8e565b
commit
85442a4760
@ -149,6 +149,8 @@ public class BukkitItemUtil {
|
||||
|| one.getType().equals(Material.SPLASH_POTION)) {
|
||||
final PotionMeta pMeta1 = (PotionMeta) one.getItemMeta();
|
||||
final PotionMeta pMeta2 = (PotionMeta) two.getItemMeta();
|
||||
// Base potion data can return null on newer versions (likely 1.20.6+)
|
||||
if (pMeta1.getBasePotionData() != null && pMeta2.getBasePotionData() != null) {
|
||||
if (!pMeta1.getBasePotionData().getType().equals(pMeta2.getBasePotionData().getType())) {
|
||||
return -9;
|
||||
}
|
||||
@ -161,6 +163,7 @@ public class BukkitItemUtil {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (one.getItemMeta().toString().startsWith("TROPICAL_FISH_BUCKET_META")) {
|
||||
final String meta1 = one.getItemMeta().toString();
|
||||
final String meta2 = two.getItemMeta().toString();
|
||||
|
Loading…
Reference in New Issue
Block a user