Fix per-arena protect flag.

This commit is contained in:
garbagemule 2014-02-11 17:27:37 +01:00
parent ea497e42c2
commit 92c4ce1a8b
2 changed files with 19 additions and 1 deletions

View File

@ -1,7 +1,7 @@
name: MobArena
author: garbagemule
main: com.garbagemule.MobArena.MobArena
version: 0.96.2.9
version: 0.96.2.10
softdepend: [Multiverse-Core,Towny,Heroes,MagicSpells,Vault]
commands:
ma:

View File

@ -155,6 +155,9 @@ public class ArenaListener
}
}
// If the arena isn't protected, care
if (!protect) return;
if (!arena.getRegion().contains(event.getBlock().getLocation()))
return;
@ -172,6 +175,9 @@ public class ArenaListener
}
public void onHangingBreak(HangingBreakEvent event) {
// If the arena isn't protected, care
if (!protect) return;
Location l = event.getEntity().getLocation();
if (!arena.getRegion().contains(l)) {
return;
@ -183,6 +189,9 @@ public class ArenaListener
}
public void onBlockBurn(BlockBurnEvent event) {
// If the arena isn't protected, care
if (!protect) return;
if (!arena.getRegion().contains(event.getBlock().getLocation()) || onBlockDestroy(event))
return;
@ -227,6 +236,9 @@ public class ArenaListener
}
public void onBlockPlace(BlockPlaceEvent event) {
// If the arena isn't protected, care
if (!protect) return;
Block b = event.getBlock();
// If the event didn't happen in the region, or if in edit mode, ignore
@ -276,6 +288,9 @@ public class ArenaListener
}
public void onBlockForm(BlockFormEvent event) {
// If the arena isn't protected, care
if (!protect) return;
if (!arena.getRegion().contains(event.getBlock().getLocation()))
return;
@ -285,6 +300,9 @@ public class ArenaListener
}
public void onBlockIgnite(BlockIgniteEvent event) {
// If the arena isn't protected, care
if (!protect) return;
Block b = event.getBlock();
if (!arena.getRegion().contains(b.getLocation()))
return;