From 14ad77c692ead6fe2d4aa69cf0f5bc82d908d3e5 Mon Sep 17 00:00:00 2001 From: Omer Uddin Date: Mon, 11 May 2020 00:44:27 -0400 Subject: [PATCH] Fix PotionEffect API Ignoring Icon bug Fixes #3142 --- ...8-Fix-PotionEffect-ignores-icon-flag.patch | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 Spigot-Server-Patches/0508-Fix-PotionEffect-ignores-icon-flag.patch diff --git a/Spigot-Server-Patches/0508-Fix-PotionEffect-ignores-icon-flag.patch b/Spigot-Server-Patches/0508-Fix-PotionEffect-ignores-icon-flag.patch new file mode 100644 index 000000000..9c6ba39af --- /dev/null +++ b/Spigot-Server-Patches/0508-Fix-PotionEffect-ignores-icon-flag.patch @@ -0,0 +1,19 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: kickash32 +Date: Fri, 8 May 2020 00:49:18 -0400 +Subject: [PATCH] Fix PotionEffect ignores icon flag + + +diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +index 245bd116d143af120127a9d25dcb7a0c43ad47a0..a461ac36144361b712e015b722e68bdb0b43dfb2 100644 +--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java ++++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +@@ -384,7 +384,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { + + @Override + public boolean addPotionEffect(PotionEffect effect, boolean force) { +- getHandle().addEffect(new MobEffect(MobEffectList.fromId(effect.getType().getId()), effect.getDuration(), effect.getAmplifier(), effect.isAmbient(), effect.hasParticles()), EntityPotionEffectEvent.Cause.PLUGIN); ++ getHandle().addEffect(new MobEffect(MobEffectList.fromId(effect.getType().getId()), effect.getDuration(), effect.getAmplifier(), effect.isAmbient(), effect.hasParticles(), effect.hasIcon()), EntityPotionEffectEvent.Cause.PLUGIN); // Paper - Don't ignore icon + return true; + } +