Fixed lobby balancing technique.

Removed random UUID for bungee redis database.
Enabled bungee name in debug output for bungee rotator.
This commit is contained in:
Jonathan Williams 2015-09-26 18:25:29 -04:00
parent 9a3ef895c9
commit 0d8ef7fea3
2 changed files with 3 additions and 3 deletions

View File

@ -96,6 +96,8 @@ public class LobbyBalancer implements Listener, Runnable
if (timeSpentInLock > 50)
System.out.println("[==] TIMING [==] Locked loading servers for " + timeSpentInLock + "ms");
_lobbyIndex = 0;
}
}
}

View File

@ -24,7 +24,6 @@ public class PlayerCount implements Listener, Runnable
{
private DataRepository<BungeeServer> _repository;
private DataRepository<BungeeServer> _secondRepository;
private UUID _uuid;
private Region _region;
private ListenerInfo _listenerInfo;
@ -34,7 +33,6 @@ public class PlayerCount implements Listener, Runnable
public PlayerCount(Plugin plugin)
{
_uuid = UUID.randomUUID();
_region = !new File("eu.dat").exists() ? Region.US : Region.EU;
_plugin = plugin;
@ -86,7 +84,7 @@ public class PlayerCount implements Listener, Runnable
*/
private BungeeServer generateSnapshot()
{
String name = _uuid.toString(); // Use random UUID for unique id name.
String name = _listenerInfo.getHost().getAddress().getHostAddress();
String host = _listenerInfo.getHost().getAddress().getHostAddress();
int port = _listenerInfo.getHost().getPort();
boolean connected = InternetStatus.isConnected();