gamecreation fix

This commit is contained in:
Chiss 2014-06-05 10:15:22 +10:00
parent 644f946f69
commit 967ff44d0a

View File

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