mirror of
https://github.com/Flowsqy/ShopChest.git
synced 2025-01-23 10:01:20 +01:00
Fix Potion error in ItemUtils
This commit is contained in:
parent
ca8c8e123a
commit
7a859b13c6
@ -27,7 +27,9 @@ public class ItemUtils {
|
||||
if (Utils.getMajorVersion() < 9) {
|
||||
return Potion.fromItemStack(itemStack).getType();
|
||||
} else {
|
||||
return ((PotionMeta) itemStack.getItemMeta()).getBasePotionData().getType();
|
||||
// TODO Maybe save reimplement the old version
|
||||
//return ((PotionMeta) itemStack.getItemMeta()).getBasePotionData().getType();
|
||||
return ((PotionMeta)itemStack.getItemMeta()).getBasePotionType();
|
||||
}
|
||||
}
|
||||
|
||||
@ -39,7 +41,9 @@ public class ItemUtils {
|
||||
if (Utils.getMajorVersion() < 9) {
|
||||
return Potion.fromItemStack(itemStack).hasExtendedDuration();
|
||||
} else {
|
||||
return ((PotionMeta) itemStack.getItemMeta()).getBasePotionData().isExtended();
|
||||
// TODO Maybe save reimplement the old version
|
||||
//return ((PotionMeta) itemStack.getItemMeta()).getBasePotionData().isExtended();
|
||||
return false; // I have no idea how to get the base duration of a potion without loading it at startup
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user