mirror of
https://github.com/songoda/FabledSkyBlock.git
synced 2024-11-07 11:10:04 +01:00
Fix for admin upgrade commands
This commit is contained in:
parent
2fe608aec2
commit
fe9b01e0d9
@ -58,14 +58,12 @@ public class AddUpgradeCommand extends SubCommand {
|
||||
targetPlayerName = targetPlayer.getName();
|
||||
}
|
||||
|
||||
Upgrade.Type upgrade;
|
||||
try {
|
||||
upgrade = Upgrade.Type.valueOf(args[1].toUpperCase());
|
||||
if(upgrade.equals(Upgrade.Type.Size) || upgrade.equals(Upgrade.Type.Members)){
|
||||
upgrade = null;
|
||||
Upgrade.Type upgrade = null;
|
||||
for(Upgrade.Type type : Upgrade.Type.values()) {
|
||||
if(type.name().toUpperCase().equals(args[1].toUpperCase())) {
|
||||
upgrade = type;
|
||||
break;
|
||||
}
|
||||
} catch(IllegalArgumentException e) {
|
||||
upgrade = null;
|
||||
}
|
||||
|
||||
if (islandOwnerUUID == null) {
|
||||
|
@ -58,14 +58,12 @@ public class RemoveUpgradeCommand extends SubCommand {
|
||||
targetPlayerName = targetPlayer.getName();
|
||||
}
|
||||
|
||||
Upgrade.Type upgrade;
|
||||
try {
|
||||
upgrade = Upgrade.Type.valueOf(args[1].toUpperCase());
|
||||
if(upgrade.equals(Upgrade.Type.Size) || upgrade.equals(Upgrade.Type.Members)){
|
||||
upgrade = null;
|
||||
Upgrade.Type upgrade = null;
|
||||
for(Upgrade.Type type : Upgrade.Type.values()) {
|
||||
if(type.name().toUpperCase().equals(args[1].toUpperCase())) {
|
||||
upgrade = type;
|
||||
break;
|
||||
}
|
||||
} catch(IllegalArgumentException e) {
|
||||
upgrade = null;
|
||||
}
|
||||
|
||||
if (islandOwnerUUID == null) {
|
||||
|
Loading…
Reference in New Issue
Block a user