time update

This commit is contained in:
Chiss 2014-12-23 13:01:44 +11:00
parent 8ed7f34ab6
commit 19a7e6d666

View File

@ -43,7 +43,7 @@ public class GameHostManager implements Listener
private Player _host;
private Rank _hostRank;
private long _serverStartTime = System.currentTimeMillis();
private long _serverExpireTime = 43200000;
private long _serverExpireTime = 21600000;
private long _lastOnline = System.currentTimeMillis();
private long _expireTime = 300000;
private boolean _hostExpired = false;
@ -110,13 +110,14 @@ public class GameHostManager implements Listener
// Admins update
for (Player player : UtilServer.getPlayers())
{
if (player.equals(_host) || _adminList.contains(player.getName()) || Manager.GetClients().Get(player).GetRank().Has(Rank.MODERATOR))
if (player.equals(_host) || _adminList.contains(player.getName()) || Manager.GetClients().Get(player).GetRank().Has(Rank.ADMIN))
{
if (Manager.GetGame() == null || Manager.GetGame().GetState() == GameState.Recruit)
giveAdminItem(player);
_lastOnline = System.currentTimeMillis();
}
if (player.equals(_host))
_lastOnline = System.currentTimeMillis();
}
}
@ -235,7 +236,7 @@ public class GameHostManager implements Listener
public boolean isAdmin(Player player, boolean includeStaff)
{
return player.equals(_host) || _adminList.contains(player.getName()) || (includeStaff && Manager.GetClients().Get(player).GetRank().Has(Rank.MODERATOR));
return player.equals(_host) || _adminList.contains(player.getName()) || (includeStaff && Manager.GetClients().Get(player).GetRank().Has(Rank.ADMIN));
}
public boolean isHost(Player player)