diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaPotion.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaPotion.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaPotion.java index 6a58ab56..43b9d96b 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaPotion.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaPotion.java @@ -71,6 +71,11 @@ class CraftMetaPotion extends CraftMetaItem implements PotionMeta { for (int i = 0; i < length; i++) { NBTTagCompound effect = list.getCompound(i); PotionEffectType type = PotionEffectType.getById(effect.getByte(ID.NBT)); + // SPIGOT-4047: Vanilla just disregards these + if (type == null) { + continue; + } + int amp = effect.getByte(AMPLIFIER.NBT); int duration = effect.getInt(DURATION.NBT); boolean ambient = effect.getBoolean(AMBIENT.NBT); |