mirror of
https://github.com/garbagemule/MobArena.git
synced 2025-01-27 10:41:19 +01:00
v0.94.4.78 - listen for sign breaks, if it is a leaderboard sign, remove it from the config
This commit is contained in:
parent
4c4e06d3a8
commit
a93749225e
@ -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:
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user