Merge pull request #234 from speedxx/development

readd console checks for saconfig
This commit is contained in:
Seth 2020-07-19 20:35:42 -07:00 committed by GitHub
commit 22d40bd0e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -39,6 +39,7 @@ public class Command_saconfig extends FreedomCommand
case "clean": case "clean":
{ {
checkConsole();
checkRank(Rank.SENIOR_ADMIN); checkRank(Rank.SENIOR_ADMIN);
FUtil.adminAction(sender.getName(), "Cleaning admin list", true); FUtil.adminAction(sender.getName(), "Cleaning admin list", true);
@ -60,6 +61,7 @@ public class Command_saconfig extends FreedomCommand
case "setrank": case "setrank":
{ {
checkConsole();
checkRank(Rank.SENIOR_ADMIN); checkRank(Rank.SENIOR_ADMIN);
if (args.length < 3) if (args.length < 3)
@ -70,7 +72,7 @@ public class Command_saconfig extends FreedomCommand
Rank rank = Rank.findRank(args[2]); Rank rank = Rank.findRank(args[2]);
if (rank == null) if (rank == null)
{ {
msg("Unknown rank: " + rank); msg("Unknown rank: " + args[2]);
return true; return true;
} }
@ -152,6 +154,7 @@ public class Command_saconfig extends FreedomCommand
return false; return false;
} }
checkConsole();
checkRank(Rank.TELNET_ADMIN); checkRank(Rank.TELNET_ADMIN);
// Player already an admin? // Player already an admin?
@ -244,7 +247,7 @@ public class Command_saconfig extends FreedomCommand
if (fPlayer.getFreezeData().isFrozen()) if (fPlayer.getFreezeData().isFrozen())
{ {
fPlayer.getFreezeData().setFrozen(false); fPlayer.getFreezeData().setFrozen(false);
msg(player.getPlayer(), "You have been unfrozen."); msg(player, "You have been unfrozen.");
} }
if (!player.isOp()) if (!player.isOp())
@ -263,6 +266,7 @@ public class Command_saconfig extends FreedomCommand
return false; return false;
} }
checkConsole();
checkRank(Rank.TELNET_ADMIN); checkRank(Rank.TELNET_ADMIN);
Player player = getPlayer(args[1]); Player player = getPlayer(args[1]);