Fix for punishments to match names exactly
Fix for expiring ranks. Fix for EU Lobby count.
This commit is contained in:
parent
1ad61a09e4
commit
ee5934c7aa
@ -28,7 +28,7 @@ public class PunishmentHandler implements CommandCallback
|
||||
String playerName = punishCommand.getPlayerName();
|
||||
boolean ban = punishCommand.getBan();
|
||||
final String reason = punishCommand.getMessage();
|
||||
final Player player = Bukkit.getPlayer(playerName);
|
||||
final Player player = Bukkit.getPlayerExact(playerName);
|
||||
|
||||
if (player != null && player.isOnline())
|
||||
{
|
||||
|
@ -336,7 +336,7 @@ public class Enjin extends MiniPlugin implements CommandExecutor
|
||||
{
|
||||
public void run()
|
||||
{
|
||||
if (_clientManager.Get(name).GetRank() == Rank.ALL || !_clientManager.Get(name).GetRank().has(rank) || _clientManager.Get(name).GetRank() == rank)
|
||||
if (rank == Rank.ALL || _clientManager.Get(name).GetRank() == Rank.ALL || !_clientManager.Get(name).GetRank().has(rank) || _clientManager.Get(name).GetRank() == rank)
|
||||
{
|
||||
_clientManager.SaveRank(name, playerUUID, rank, perm);
|
||||
System.out.println("[" + _dateFormat.format(new Date()) + "] " + name + " received " + rank + " " + (perm ? "permanently." : "for 1 month."));
|
||||
|
@ -454,20 +454,26 @@ public class ServerMonitor
|
||||
// Minimum 1500 slot bufferzone
|
||||
if (serverGroup.getName().equalsIgnoreCase("Lobby"))
|
||||
{
|
||||
if (_region == Region.EU)
|
||||
{
|
||||
requiredTotal = 10;
|
||||
requiredJoinable = 10;
|
||||
}
|
||||
|
||||
int availableSlots = serverGroup.getMaxPlayerCount() - serverGroup.getPlayerCount();
|
||||
|
||||
if (availableSlots < 1500)
|
||||
if (availableSlots < 1000)
|
||||
{
|
||||
serversToAdd = Math.max(1, (1500 - availableSlots) / serverGroup.getMaxPlayers());
|
||||
serversToAdd = Math.max(1, (1000 - availableSlots) / serverGroup.getMaxPlayers());
|
||||
serversToAdd = Math.min(250 - totalServers, serversToAdd);
|
||||
serversToKill = 0;
|
||||
}
|
||||
else if (serversToKill > 0)
|
||||
serversToKill = Math.min(serversToKill, (availableSlots - 1500) / 80);
|
||||
serversToKill = Math.min(serversToKill, (availableSlots - 1000) / 80);
|
||||
else if (serversToAdd == 0 && joinableServers > requiredJoinable && totalServers > requiredTotal)
|
||||
{
|
||||
serversToRestart = Math.min(joinableServers - requiredJoinable, joinableServers - requiredTotal);
|
||||
serversToRestart = Math.min(serversToRestart, (availableSlots - 1500) / 80);
|
||||
serversToRestart = Math.min(serversToRestart, (availableSlots - 1000) / 80);
|
||||
|
||||
if (serversToRestart <= 5)
|
||||
serversToRestart = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user