From b783f8ecbba42e5e8bc5a708d5d2df620f22203a Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 6 Jun 2012 20:27:23 -0400 Subject: [PATCH] v0.94.4.70 - Fix "random" class sign not working --- resources/plugin.yml | 2 +- src/com/garbagemule/MobArena/ArenaImpl.java | 2 +- src/com/garbagemule/MobArena/ArenaListener.java | 10 ++++++---- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/resources/plugin.yml b/resources/plugin.yml index c495346..0949d28 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.69 +version: 0.94.4.70 softdepend: [Spout,MultiVerse,XcraftGate,Towny,Heroes,MagicSpells,Vault] commands: ma: diff --git a/src/com/garbagemule/MobArena/ArenaImpl.java b/src/com/garbagemule/MobArena/ArenaImpl.java index 85f047e..359237b 100644 --- a/src/com/garbagemule/MobArena/ArenaImpl.java +++ b/src/com/garbagemule/MobArena/ArenaImpl.java @@ -998,7 +998,7 @@ public class ArenaImpl implements Arena } assignClass(p, className); - Messenger.tellPlayer(p, Msg.LOBBY_CLASS_PICKED, className); + Messenger.tellPlayer(p, Msg.LOBBY_CLASS_PICKED, TextUtils.camelCase(className), getClassLogo(className)); } @Override diff --git a/src/com/garbagemule/MobArena/ArenaListener.java b/src/com/garbagemule/MobArena/ArenaListener.java index 273c045..c647f86 100644 --- a/src/com/garbagemule/MobArena/ArenaListener.java +++ b/src/com/garbagemule/MobArena/ArenaListener.java @@ -815,12 +815,14 @@ public class ArenaListener private void delayAssignClass(final Player p, final String className) { plugin.getServer().getScheduler().scheduleSyncDelayedTask(plugin,new Runnable() { public void run() { - arena.assignClass(p, className); - - if (!className.equalsIgnoreCase("random")) + if (!className.equalsIgnoreCase("random")) { + arena.assignClass(p, className); Messenger.tellPlayer(p, Msg.LOBBY_CLASS_PICKED, TextUtils.camelCase(className), arena.getClassLogo(className)); - else + } + else { + arena.assignRandomClass(p); Messenger.tellPlayer(p, Msg.LOBBY_CLASS_RANDOM); + } } }); }