Prevent /saconfig setrank from setting to a console rank. Fixes #1721

This commit is contained in:
JeromSar 2016-08-26 12:43:36 +02:00
parent f2260d56a4
commit c885bbb144

View File

@ -74,6 +74,12 @@ public class Command_saconfig extends FreedomCommand
return true; return true;
} }
if (rank.isConsole())
{
msg("You cannot set players to a console rank");
return true;
}
if (!rank.isAtLeast(Rank.SUPER_ADMIN)) if (!rank.isAtLeast(Rank.SUPER_ADMIN))
{ {
msg("Rank must be superadmin or higher.", ChatColor.RED); msg("Rank must be superadmin or higher.", ChatColor.RED);