Countdown won't stop and start the game if needed players are online
<p>I am having this problem with my code. When i am the only one online the game will start normaly and the countdown will stop but when there are two or more players online the game wont start and the countdown begins at 120 wich should happend if only one player was online. Anyone that has an conclusion?</p>

<p>My code:</p>

<pre><code>@Override
public void run() {

    if (timeUntilStart == 0) {
        if (!Game.canStart()) {
            if(Bukkit.getOnlinePlayers().size() &lt;= 2) {
            plugin.restartCountdown();
            ChatUtilities.broadcast(ChatColor.RED + "Not enough players to start. Countdown will");
            ChatUtilities.broadcast(ChatColor.RED + "restart.");
            for (Player p : Bukkit.getOnlinePlayers()) p.playSound(p.getLocation(), Sound.ENDERDRAGON_WINGS, 5, 1);
        }else{
            if(Game.canStart()) {
                if(Bukkit.getOnlinePlayers().size() &gt;= 2) {
            Game.start();
                }
            }
            }
        }

    }


    boolean broadcast = false;

    for (Player p : Bukkit.getOnlinePlayers()) {
        p.setLevel(timeUntilStart);

        if (timeUntilStart &lt; 6  || timeUntilStart == 10 || timeUntilStart == 120 ||timeUntilStart == 60 || timeUntilStart == 30) {
            p.playSound(p.getLocation(), Sound.ORB_PICKUP, 5, 0);
            if (timeUntilStart == 0) p.playSound(p.getLocation(), Sound.ZOMBIE_INFECT , 5, 1);
            broadcast = true;
        }
    }


    if (broadcast) ChatUtilities.broadcast(String.valueOf(timeUntilStart) + " §3Seconds until the game starts!");
    {

    }





    timeUntilStart -= 1;
    if (timeUntilStart &lt; 0) {timeUntilStart = 0;
    if(Bukkit.getOnlinePlayers().size() &lt;= 2) {
        plugin.restartCountdown();

}else{
    if(Bukkit.getOnlinePlayers().size() &gt;= 2) {

    Game.start();
}



}
     }
}
 }
</code></pre>