mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-21 07:41:30 +01:00
Fix another mistake in previous commits causing server crash
By: md_5 <git@md-5.net>
This commit is contained in:
parent
b00fd47b85
commit
b6271a3554
@ -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…
Reference in New Issue
Block a user