A few I missed

This commit is contained in:
Olof Larsson 2013-04-18 11:11:18 +02:00
parent 9e6904b564
commit 8c00268015
2 changed files with 5 additions and 7 deletions

View File

@ -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);

View File

@ -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...