added a little msg for people in UHC, informing that it will start soon
This commit is contained in:
parent
75c07588a5
commit
e286bec777
@ -102,6 +102,8 @@ public class UHC extends TeamGame
|
||||
|
||||
private boolean xrayDebug = false;
|
||||
|
||||
private long lastInform = 0;
|
||||
|
||||
public UHC(ArcadeManager manager)
|
||||
{
|
||||
super(manager, GameType.UHC,
|
||||
@ -1578,4 +1580,14 @@ public class UHC extends TeamGame
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void informStartSoon()
|
||||
{
|
||||
if (UtilTime.elapsed(lastInform, 20000))
|
||||
{
|
||||
lastInform = System.currentTimeMillis();
|
||||
|
||||
Bukkit.broadcastMessage(C.cGray + "Countdown will start in " + UtilTime.MakeStr(150000 - (System.currentTimeMillis() - GetStateTime())) +"...");
|
||||
}
|
||||
}
|
||||
}
|
@ -29,6 +29,7 @@ import nautilus.game.arcade.game.Game;
|
||||
import nautilus.game.arcade.game.GameTeam;
|
||||
import nautilus.game.arcade.game.Game.GameState;
|
||||
import nautilus.game.arcade.game.GameTeam.PlayerState;
|
||||
import nautilus.game.arcade.game.games.uhc.UHC;
|
||||
import nautilus.game.arcade.stats.StatTracker;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
@ -200,8 +201,13 @@ public class GameManager implements Listener
|
||||
public void StateCountdown(Game game, int timer, boolean force)
|
||||
{
|
||||
//Always give time to pick team.
|
||||
if (!game.GetCountdownForce() && !force && !UtilTime.elapsed(game.GetStateTime(), game.GetType() == GameType.UHC ? 120000 : 15000))
|
||||
if (!game.GetCountdownForce() && !force && !UtilTime.elapsed(game.GetStateTime(), game.GetType() == GameType.UHC ? 150000 : 15000))
|
||||
{
|
||||
if (game.GetType() == GameType.UHC)
|
||||
{
|
||||
((UHC)game).informStartSoon();
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user