mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-27 01:05:38 +00:00
readd console checks for saconfig
This commit is contained in:
parent
fc31babff3
commit
3f75712732
@ -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]);
|
||||||
|
Loading…
Reference in New Issue
Block a user