Added /lockdown

This commit is contained in:
JeromSar
2013-08-12 20:47:36 +02:00
parent 56493adcae
commit bac25258b0
6 changed files with 62 additions and 25 deletions

View File

@ -253,6 +253,12 @@ public class TFM_ServerInterface
return;
}
if (TotalFreedomMod.lockdownEnabled)
{
event.disallow(PlayerLoginEvent.Result.KICK_OTHER, "Server is currently in lockdown mode.");
return;
}
if (player_list.hasWhitelist)
{
if (!player_list.getWhitelisted().contains(player_name.toLowerCase()))
@ -295,6 +301,11 @@ public class TFM_ServerInterface
}
}
}
if (TotalFreedomMod.lockdownEnabled)
{
TFM_Util.playerMsg(p, "Warning: Server is currenty in lockdown-mode, new players will not be able to join!", ChatColor.RED);
}
}
}