diff --git a/Bukkit/src/main/java/com/plotsquared/bukkit/listener/ProjectileEventListener.java b/Bukkit/src/main/java/com/plotsquared/bukkit/listener/ProjectileEventListener.java index 1309bac19..9a28ab448 100644 --- a/Bukkit/src/main/java/com/plotsquared/bukkit/listener/ProjectileEventListener.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/listener/ProjectileEventListener.java @@ -62,6 +62,13 @@ public class ProjectileEventListener implements Listener { this.plotAreaManager = plotAreaManager; } + @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) + public void onLingeringPotionSplash(LingeringPotionSplashEvent event) { + // Cancelling projectile hit events still results in area effect clouds. + // We need to cancel the splash events to get rid of those. + onProjectileHit(event); + } + @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) public void onPotionSplash(PotionSplashEvent event) { ThrownPotion damager = event.getPotion(); @@ -78,6 +85,11 @@ public class ProjectileEventListener implements Listener { } if (count > 0 && count == event.getAffectedEntities().size()) { event.setCancelled(true); + } else { + // Cancelling projectile hit events still results in potions + // splashing in the world. We need to cancel the splash events to + // avoid that. + onProjectileHit(event); } }