Merge branch 'master' of ssh://184.154.0.242:7999/min/Mineplex

This commit is contained in:
Peter Miller 2014-06-06 09:53:24 -04:00
commit cad57b7a74

View File

@ -104,6 +104,8 @@ public class GameCreationManager implements Listener
}
else
{
boolean removedPlayers = false;
if (UtilTime.elapsed(game.GetStateTime(), 10000))
{
TimeUtil.start("GameCreationManager - Kick Players - " + game.GetName());
@ -112,15 +114,21 @@ public class GameCreationManager implements Listener
{
System.out.println("Kicking [" + player.getName() + "] with Validity [" + player.isValid() + "] with Online [" + player.isOnline() + "]");
player.remove();
player.kickPlayer("Dead World");
}
removedPlayers = true;
TimeUtil.stop();
}
//Clean
if (game.WorldData.World.getPlayers().isEmpty())
if (removedPlayers || game.WorldData.World.getPlayers().isEmpty())
{
if (game.WorldData.World.getPlayers().isEmpty())
System.out.println("World Player Count [" + game.WorldData.World.getPlayers().size() + "]");
TimeUtil.start("GameCreationManager - Uninit World - " + game.GetName());
game.WorldData.Uninitialize();