summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2018-08-03 20:01:12 +1000
committermd_5 <git@md-5.net>2018-08-03 20:01:12 +1000
commitdabb1b930bf4f6ce622fb2ef937c002db43deabf (patch)
tree48d5a2543122690dcb85ff7a2462dc1fd9c85f0f /src
parent9331153551c33d719c35bb533f84e9ef6b254766 (diff)
downloadcraftbukkit-dabb1b930bf4f6ce622fb2ef937c002db43deabf.tar
craftbukkit-dabb1b930bf4f6ce622fb2ef937c002db43deabf.tar.gz
craftbukkit-dabb1b930bf4f6ce622fb2ef937c002db43deabf.tar.lz
craftbukkit-dabb1b930bf4f6ce622fb2ef937c002db43deabf.tar.xz
craftbukkit-dabb1b930bf4f6ce622fb2ef937c002db43deabf.zip
Potion particles should default to true
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaPotion.java2
1 files changed, 1 insertions, 1 deletions
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));
}