v0.94.4.78 - listen for sign breaks, if it is a leaderboard sign, remove it from the config
This commit is contained in:
@@ -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;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user