diff --git a/worldguard-bukkit/src/main/java/com/sk89q/worldguard/bukkit/listener/EventAbstractionListener.java b/worldguard-bukkit/src/main/java/com/sk89q/worldguard/bukkit/listener/EventAbstractionListener.java index 14c49c2a..9aafddb9 100644 --- a/worldguard-bukkit/src/main/java/com/sk89q/worldguard/bukkit/listener/EventAbstractionListener.java +++ b/worldguard-bukkit/src/main/java/com/sk89q/worldguard/bukkit/listener/EventAbstractionListener.java @@ -1015,7 +1015,6 @@ public void onPotionSplash(PotionSplashEvent event) { // Fire item interaction event Events.fireToCancel(event, new UseItemEvent(event, cause, world, potion.getItem())); - // Fire entity interaction event if (!event.isCancelled()) { int blocked = 0; @@ -1027,8 +1026,11 @@ public void onPotionSplash(PotionSplashEvent event) { ? new DamageEntityEvent(event, cause, affected) : new UseEntityEvent(event, cause, affected); - // Consider the potion splash flag + // Consider extra relevant flags delegate.getRelevantFlags().add(Flags.POTION_SPLASH); + if (potion.getShooter() instanceof LivingEntity shooter && !(shooter instanceof Player) && affected instanceof Player) { + delegate.getRelevantFlags().add(Flags.MOB_DAMAGE); + } if (Events.fireAndTestCancel(delegate)) { event.setIntensity(affected, 0);