Fix another mistake in previous commits causing server crash
This commit is contained in:
parent
b10ea735ca
commit
63b46678a5
@ -1611,8 +1611,7 @@ public class CraftEventFactory {
|
||||
PotionEffect bukkitOldEffect = (oldEffect == null) ? null : CraftPotionUtil.toBukkit(oldEffect);
|
||||
PotionEffect bukkitNewEffect = (newEffect == null) ? null : CraftPotionUtil.toBukkit(newEffect);
|
||||
|
||||
Preconditions.checkState(bukkitOldEffect != null, "Old and new potion is null");
|
||||
Preconditions.checkState(bukkitNewEffect != null, "New potion effect is null");
|
||||
Preconditions.checkState(bukkitOldEffect != null || bukkitNewEffect != null, "Old and new potion effect are both null");
|
||||
|
||||
EntityPotionEffectEvent event = new EntityPotionEffectEvent((LivingEntity) entity.getBukkitEntity(), bukkitOldEffect, bukkitNewEffect, cause, action, willOverride);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
|
Loading…
x
Reference in New Issue
Block a user