diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionUtil.java b/paper-server/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionUtil.java index 01af4db5d0..cb11f0624e 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionUtil.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionUtil.java @@ -78,6 +78,7 @@ public class CraftPotionUtil { public static MobEffectInstance fromBukkit(PotionEffect effect) { Holder type = CraftPotionEffectType.bukkitToMinecraftHolder(effect.getType()); + // Paper - Note: do not copy over the hidden effect, as this method is only used for applying to entities which we do not want to convert over. return new MobEffectInstance(type, effect.getDuration(), effect.getAmplifier(), effect.isAmbient(), effect.hasParticles(), effect.hasIcon()); // Paper } @@ -87,7 +88,7 @@ public class CraftPotionUtil { int duration = effect.getDuration(); boolean ambient = effect.isAmbient(); boolean particles = effect.isVisible(); - return new PotionEffect(type, duration, amp, ambient, particles, effect.showIcon()); // Paper + return new PotionEffect(type, duration, amp, ambient, particles, effect.showIcon(), effect.hiddenEffect == null ? null : toBukkit(effect.hiddenEffect)); // Paper } public static boolean equals(Holder mobEffect, PotionEffectType type) {