Backwards compatibility for leaderboard coords.

This commit is contained in:
garbagemule 2013-08-16 03:27:54 +02:00
parent 186fc498cf
commit 8793bd6cef
2 changed files with 7 additions and 2 deletions

View File

@ -1,7 +1,7 @@
name: MobArena
author: garbagemule
main: com.garbagemule.MobArena.MobArena
version: 0.95.5.19
version: 0.95.5.21
softdepend: [Multiverse-Core,Towny,Heroes,MagicSpells,Vault]
commands:
ma:

View File

@ -77,7 +77,12 @@ public class ArenaRegion
}
public void reloadLeaderboards() {
leaderboard = parseLocation(coords, "leaderboard", null);
// try-catch for backwards compatibility
try {
leaderboard = parseLocation(coords, "leaderboard", null);
} catch (IllegalArgumentException e) {
leaderboard = parseLocation(coords, "leaderboard", world);
}
if (leaderboard != null && leaderboard.getWorld() == null) {
leaderboard.setWorld(world);
}