gamecreation fix

This commit is contained in:
Chiss 2014-06-05 10:15:22 +10:00
parent 644f946f69
commit 967ff44d0a
1 changed files with 9 additions and 1 deletions

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();