From 64264bdd797a30315a1f4c60353b88ef9f88d2c7 Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Thu, 7 Feb 2019 00:40:41 -0500 Subject: [PATCH] Make AreaEffectCloudApplyEvent cancellable By: bermudalocket --- paper-server/nms-patches/EntityAreaEffectCloud.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paper-server/nms-patches/EntityAreaEffectCloud.patch b/paper-server/nms-patches/EntityAreaEffectCloud.patch index 8e003c16f7..3b1d968045 100644 --- a/paper-server/nms-patches/EntityAreaEffectCloud.patch +++ b/paper-server/nms-patches/EntityAreaEffectCloud.patch @@ -52,7 +52,7 @@ + } + } + org.bukkit.event.entity.AreaEffectCloudApplyEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callAreaEffectCloudApplyEvent(this, entities); -+ if (true) { // Preserve NMS spacing and bracket count for smallest diff ++ if (!event.isCancelled()) { + for (LivingEntity entity : event.getAffectedEntities()) { + if (entity instanceof CraftLivingEntity) { + EntityLiving entityliving = ((CraftLivingEntity) entity).getHandle();