Security & improvement update (#19)

This commit is contained in:
Seth
2018-01-07 12:33:58 -07:00
committed by Lemon
parent 09e5b39099
commit d2eea67f67
11 changed files with 142 additions and 52 deletions

View File

@ -8,7 +8,7 @@ import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.ONLY_CONSOLE, blockHostConsole = true)
@CommandParameters(description = "Close server to non-superadmins.", usage = "/<command> [on | off]")
@CommandParameters(description = "Close server to non-admins.", usage = "/<command> [on | off]")
public class Command_adminmode extends FreedomCommand
{
@ -29,12 +29,12 @@ public class Command_adminmode extends FreedomCommand
else if (args[0].equalsIgnoreCase("on"))
{
ConfigEntry.ADMIN_ONLY_MODE.setBoolean(true);
FUtil.adminAction(sender.getName(), "Closing the server to non-superadmins.", true);
FUtil.adminAction(sender.getName(), "Closing the server to non-admins.", true);
for (Player player : server.getOnlinePlayers())
{
if (!isAdmin(player))
{
player.kickPlayer("Server is now closed to non-superadmins.");
player.kickPlayer("Server is now closed to non-admins.");
}
}
return true;