mirror of
https://github.com/garbagemule/MobArena.git
synced 2024-11-26 04:25:21 +01:00
Fix per-arena protect flag.
This commit is contained in:
parent
ea497e42c2
commit
92c4ce1a8b
@ -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:
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user