13
0
geforkt von Mirrors/Paper

SPIGOT-5591: Allow concurrent potion effects

By: md_5 <git@md-5.net>
Dieser Commit ist enthalten in:
CraftBukkit/Spigot 2020-02-23 10:33:10 +11:00
Ursprung aac54fb8a7
Commit c98e5fba12

Datei anzeigen

@ -321,12 +321,6 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@Override @Override
public boolean addPotionEffect(PotionEffect effect, boolean force) { public boolean addPotionEffect(PotionEffect effect, boolean force) {
if (hasPotionEffect(effect.getType())) {
if (!force) {
return false;
}
removePotionEffect(effect.getType());
}
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()), EntityPotionEffectEvent.Cause.PLUGIN);
return true; return true;
} }