gamecreation fix
This commit is contained in:
parent
644f946f69
commit
967ff44d0a
@ -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();
|
||||||
|
Loading…
Reference in New Issue
Block a user