From a93749225e22d160e884ed1d74e92b4de517e18e Mon Sep 17 00:00:00 2001 From: Brian Date: Sun, 29 Jul 2012 22:30:16 -0400 Subject: [PATCH] v0.94.4.78 - listen for sign breaks, if it is a leaderboard sign, remove it from the config --- resources/plugin.yml | 2 +- src/com/garbagemule/MobArena/ArenaListener.java | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/resources/plugin.yml b/resources/plugin.yml index 04ba260..4afc01a 100644 --- a/resources/plugin.yml +++ b/resources/plugin.yml @@ -1,7 +1,7 @@ name: MobArena author: garbagemule main: com.garbagemule.MobArena.MobArena -version: 0.94.4.77 +version: 0.94.4.78 softdepend: [Spout,MultiVerse,MultiWorld,XcraftGate,Towny,Heroes,MagicSpells,Vault] commands: ma: diff --git a/src/com/garbagemule/MobArena/ArenaListener.java b/src/com/garbagemule/MobArena/ArenaListener.java index 8973887..2266c63 100644 --- a/src/com/garbagemule/MobArena/ArenaListener.java +++ b/src/com/garbagemule/MobArena/ArenaListener.java @@ -139,6 +139,14 @@ public class ArenaListener } 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())) return;