v0.94.4.78 - listen for sign breaks, if it is a leaderboard sign, remove it from the config

This commit is contained in:
Brian
2012-07-29 22:30:16 -04:00
parent 4c4e06d3a8
commit a93749225e
2 changed files with 9 additions and 1 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
name: MobArena name: MobArena
author: garbagemule author: garbagemule
main: com.garbagemule.MobArena.MobArena main: com.garbagemule.MobArena.MobArena
version: 0.94.4.77 version: 0.94.4.78
softdepend: [Spout,MultiVerse,MultiWorld,XcraftGate,Towny,Heroes,MagicSpells,Vault] softdepend: [Spout,MultiVerse,MultiWorld,XcraftGate,Towny,Heroes,MagicSpells,Vault]
commands: commands:
ma: ma:
@@ -139,6 +139,14 @@ public class ArenaListener
} }
public void onBlockBreak(BlockBreakEvent event) { public void onBlockBreak(BlockBreakEvent event) {
// Check if the block is a sign, it might be a leaderboard
if (event.getBlock() instanceof Sign) {
// If the sign is the leaderboard sign, null out the config
if (event.getBlock().getLocation().equals(arena.getRegion().getLeaderboard())) {
arena.getRegion().set("leaderboard", null);
}
}
if (!arena.getRegion().contains(event.getBlock().getLocation())) if (!arena.getRegion().contains(event.getBlock().getLocation()))
return; return;