B R A C E S

This commit is contained in:
Spencer 2017-11-25 15:53:44 -05:00 committed by Alexander Meech
parent 19f637ba30
commit 331b20ed47
2 changed files with 11 additions and 5 deletions

View File

@ -15,21 +15,26 @@ public class ToggleAfkKickCommand extends CommandBase<ArcadeManager>
super(plugin, IdleManager.Perm.TOGGLE_AFK_KICK_COMMAND, "toggleafkkick", "afkkick");
}
public void toggleAfkKick() {
public void toggleAfkKick()
{
GameServerConfig config = Plugin.GetServerConfig();
config.PlayerKickIdle = !config.PlayerKickIdle;
}
@Override
public void Execute(Player caller, String[] args) {
public void Execute(Player caller, String[] args)
{
toggleAfkKick();
String message = C.cGray + "AFK kick is now ";
if (Plugin.IsPlayerKickIdle()) {
if (Plugin.IsPlayerKickIdle())
{
message += C.cGreen + "enabled";
} else {
}
else
{
message += C.cRed + "disabled";
}

View File

@ -62,7 +62,8 @@ public class IdleManager implements Listener
PermissionGroup.ADMIN.setPermission(Perm.TOGGLE_AFK_KICK_COMMAND, true, true);
if (UtilServer.isTestServer()) {
if (UtilServer.isTestServer())
{
PermissionGroup.QA.setPermission(Perm.TOGGLE_AFK_KICK_COMMAND, true, true);
}
}