diff --git a/src/com/massivecraft/massivecore/adapter/ItemStackAdapterInner19.java b/src/com/massivecraft/massivecore/adapter/ItemStackAdapterInner19.java index f0bf0a79..68aed19c 100644 --- a/src/com/massivecraft/massivecore/adapter/ItemStackAdapterInner19.java +++ b/src/com/massivecraft/massivecore/adapter/ItemStackAdapterInner19.java @@ -128,12 +128,14 @@ public class ItemStackAdapterInner19 extends ItemStackAdapterInner18 boolean extended = potion.hasExtendedDuration(); boolean upgraded = (potion.getLevel() >= 2); - // Try to avoid slow exceptions. - // The same checks are done in the PotionData constructor. + // This section serves two purposes: + // 1. Avoid slow exceptions over for invalid damage values. + // 2. Lenient upgrade to Minecraft 1.9. Keep what we can. + // If a potion was both upgraded and extended we keep the upgraded and remove the extended. if (type == null) return null; if (extended && ! type.isExtendable()) return null; if (upgraded && ! type.isUpgradeable()) return null; - if (upgraded && extended) return null; + if (upgraded && extended) extended = false; return new PotionData(type, extended, upgraded); }