mirror of
https://github.com/garbagemule/MobArena.git
synced 2024-11-27 13:07:16 +01:00
fix an NPE, order matters!
This commit is contained in:
parent
cb06e2cb1e
commit
dd2ec4c157
BIN
MobArena.jar
BIN
MobArena.jar
Binary file not shown.
@ -792,9 +792,13 @@ public class ArenaListener
|
||||
ArenaClass oldAC = arena.getArenaPlayer(p).getArenaClass();
|
||||
ArenaClass newAC = arena.getClasses().get(className);
|
||||
|
||||
// If they picked the same sign, don't do anything
|
||||
if (oldAC.equals(newAC)) {
|
||||
return;
|
||||
// If they already had a class, make sure to change the "in use" in the Class Limit Manager
|
||||
if (oldAC != null) {
|
||||
// If they picked the same sign, don't do anything
|
||||
if (oldAC.equals(newAC)) {
|
||||
return;
|
||||
}
|
||||
classLimits.playerChangedClass(oldAC);
|
||||
}
|
||||
|
||||
// If they can not join the class, deny them
|
||||
@ -803,11 +807,6 @@ public class ArenaListener
|
||||
return;
|
||||
}
|
||||
|
||||
// If they already had a class, make sure to change the "in use" in the Class Limit Manager
|
||||
if (oldAC != null) {
|
||||
classLimits.playerChangedClass(oldAC);
|
||||
}
|
||||
|
||||
// Increment the "in use" in the Class Limit Manager
|
||||
classLimits.playerPickedClass(newAC);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user