From 8c00268015da59c595ed59f3cec3166601587c0a Mon Sep 17 00:00:00 2001 From: Olof Larsson Date: Thu, 18 Apr 2013 11:11:18 +0200 Subject: [PATCH] A few I missed --- .../factions/listeners/FactionsEntityListener.java | 4 +--- .../factions/listeners/FactionsExploitListener.java | 8 ++++---- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/com/massivecraft/factions/listeners/FactionsEntityListener.java b/src/com/massivecraft/factions/listeners/FactionsEntityListener.java index 009538df..d1a84005 100644 --- a/src/com/massivecraft/factions/listeners/FactionsEntityListener.java +++ b/src/com/massivecraft/factions/listeners/FactionsEntityListener.java @@ -154,11 +154,9 @@ public class FactionsEntityListener implements Listener } // mainly for flaming arrows; don't want allies or people in safe zones to be ignited even after damage event is cancelled - @EventHandler(priority = EventPriority.NORMAL) + @EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true) public void onEntityCombustByEntity(EntityCombustByEntityEvent event) { - if (event.isCancelled()) return; - EntityDamageByEntityEvent sub = new EntityDamageByEntityEvent(event.getCombuster(), event.getEntity(), EntityDamageEvent.DamageCause.FIRE, 0); if ( ! this.canDamagerHurtDamagee(sub, false)) event.setCancelled(true); diff --git a/src/com/massivecraft/factions/listeners/FactionsExploitListener.java b/src/com/massivecraft/factions/listeners/FactionsExploitListener.java index 07c1b1cb..59ae13e8 100644 --- a/src/com/massivecraft/factions/listeners/FactionsExploitListener.java +++ b/src/com/massivecraft/factions/listeners/FactionsExploitListener.java @@ -14,10 +14,10 @@ import com.massivecraft.factions.ConfServer; public class FactionsExploitListener implements Listener { - @EventHandler(priority = EventPriority.NORMAL) + @EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true) public void obsidianGenerator(BlockFromToEvent event) { - if (event.isCancelled() == true || ! ConfServer.handleExploitObsidianGenerators) return; + if (!ConfServer.handleExploitObsidianGenerators) return; // thanks to ObGenBlocker and WorldGuard for this method Block block = event.getToBlock(); @@ -28,10 +28,10 @@ public class FactionsExploitListener implements Listener } - @EventHandler(priority = EventPriority.NORMAL) + @EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true) public void enderPearlTeleport(PlayerTeleportEvent event) { - if (event.isCancelled() == true || ! ConfServer.handleExploitEnderPearlClipping) return; + if (!ConfServer.handleExploitEnderPearlClipping) return; if (event.getCause() != PlayerTeleportEvent.TeleportCause.ENDER_PEARL) return; // this exploit works when the target location is within 0.31 blocks or so of a door or glass block or similar...