From dabb1b930bf4f6ce622fb2ef937c002db43deabf Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 3 Aug 2018 20:01:12 +1000 Subject: Potion particles should default to true --- src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaPotion.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaPotion.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaPotion.java index 81e1a40c..29fbdcc8 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaPotion.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaPotion.java @@ -80,7 +80,7 @@ class CraftMetaPotion extends CraftMetaItem implements PotionMeta { int amp = effect.getByte(AMPLIFIER.NBT); int duration = effect.getInt(DURATION.NBT); boolean ambient = effect.getBoolean(AMBIENT.NBT); - boolean particles = effect.getBoolean(SHOW_PARTICLES.NBT); + boolean particles = tag.hasKeyOfType(SHOW_PARTICLES.NBT, CraftMagicNumbers.NBT.TAG_BYTE) ? effect.getBoolean(SHOW_PARTICLES.NBT) : true; boolean icon = tag.hasKeyOfType(SHOW_ICON.NBT, CraftMagicNumbers.NBT.TAG_BYTE) ? effect.getBoolean(SHOW_ICON.NBT) : particles; customEffects.add(new PotionEffect(type, duration, amp, ambient, particles, icon)); } -- cgit v1.2.3