Fix PotionAPI ignores icon flag (#9864)
* fix PotionAPI ignores icon flag * also fix CraftPotionUtil#toBukkit * also CraftPotionUtil#fromBukkit * use CraftPotionUtil
This commit is contained in:
@@ -174,7 +174,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
@Override
|
||||
public boolean addPotionEffect(PotionEffect effect, boolean force) {
|
||||
+ org.spigotmc.AsyncCatcher.catchOp("effect add"); // Paper
|
||||
this.getHandle().addEffect(new MobEffectInstance(CraftPotionEffectType.bukkitToMinecraft(effect.getType()), effect.getDuration(), effect.getAmplifier(), effect.isAmbient(), effect.hasParticles(), effect.hasIcon()), EntityPotionEffectEvent.Cause.PLUGIN); // Paper - Don't ignore icon
|
||||
this.getHandle().addEffect(CraftPotionUtil.fromBukkit(effect), EntityPotionEffectEvent.Cause.PLUGIN); // Paper - Don't ignore icon
|
||||
return true;
|
||||
}
|
||||
diff --git a/src/main/java/org/spigotmc/AsyncCatcher.java b/src/main/java/org/spigotmc/AsyncCatcher.java
|
||||
|
||||
Reference in New Issue
Block a user