diff options
author | Thinkofdeath <thinkofdeath@spigotmc.org> | 2015-03-11 11:54:31 +0000 |
---|---|---|
committer | Thinkofdeath <thinkofdeath@spigotmc.org> | 2015-03-11 11:54:31 +0000 |
commit | 294d07dcc011e44469fabe86d5735682fbecffc6 (patch) | |
tree | 38b2091232465bfda4896f0b5f212b26fa007f9e | |
parent | 7a30c3117e058ab82ad9721a1abc6500bb02cbd2 (diff) | |
download | craftbukkit-294d07dcc011e44469fabe86d5735682fbecffc6.tar craftbukkit-294d07dcc011e44469fabe86d5735682fbecffc6.tar.gz craftbukkit-294d07dcc011e44469fabe86d5735682fbecffc6.tar.lz craftbukkit-294d07dcc011e44469fabe86d5735682fbecffc6.tar.xz craftbukkit-294d07dcc011e44469fabe86d5735682fbecffc6.zip |
SPIGOT-678: Fix the particles flag being ignored in PotionMeta
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaPotion.java | 5 |
1 files changed, 4 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 cebb941f..553fcdfa 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaPotion.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaPotion.java @@ -24,6 +24,7 @@ class CraftMetaPotion extends CraftMetaItem implements PotionMeta { static final ItemMetaKey AMPLIFIER = new ItemMetaKey("Amplifier", "amplifier"); static final ItemMetaKey AMBIENT = new ItemMetaKey("Ambient", "ambient"); static final ItemMetaKey DURATION = new ItemMetaKey("Duration", "duration"); + static final ItemMetaKey SHOW_PARTICLES = new ItemMetaKey("ShowParticles", "has-particles"); static final ItemMetaKey POTION_EFFECTS = new ItemMetaKey("CustomPotionEffects", "custom-effects"); static final ItemMetaKey ID = new ItemMetaKey("Id", "potion-id"); @@ -55,7 +56,8 @@ class CraftMetaPotion extends CraftMetaItem implements PotionMeta { int amp = effect.getByte(AMPLIFIER.NBT); int duration = effect.getInt(DURATION.NBT); boolean ambient = effect.getBoolean(AMBIENT.NBT); - customEffects.add(new PotionEffect(type, duration, amp, ambient)); + boolean particles = effect.getBoolean(SHOW_PARTICLES.NBT); + customEffects.add(new PotionEffect(type, duration, amp, ambient, particles)); } } } @@ -90,6 +92,7 @@ class CraftMetaPotion extends CraftMetaItem implements PotionMeta { effectData.setByte(AMPLIFIER.NBT, (byte) effect.getAmplifier()); effectData.setInt(DURATION.NBT, effect.getDuration()); effectData.setBoolean(AMBIENT.NBT, effect.isAmbient()); + effectData.setBoolean(SHOW_PARTICLES.NBT, effect.hasParticles()); effectList.add(effectData); } } |