Fixed mineplexer server status link.

Fixed issue with ServerManager and default connection.
This commit is contained in:
Jonathan Williams 2015-06-30 03:49:53 -04:00
parent e3d060376b
commit c6e4c5c5e4
3 changed files with 6 additions and 4 deletions

View File

@ -10,6 +10,7 @@ import mineplex.serverdata.data.BungeeServer;
import mineplex.serverdata.data.DataRepository; import mineplex.serverdata.data.DataRepository;
import mineplex.serverdata.redis.RedisDataRepository; import mineplex.serverdata.redis.RedisDataRepository;
import mineplex.serverdata.servers.ConnectionData; import mineplex.serverdata.servers.ConnectionData;
import mineplex.serverdata.servers.ConnectionData.ConnectionType;
import mineplex.serverdata.servers.ServerManager; import mineplex.serverdata.servers.ServerManager;
import mineplex.serverdata.servers.ServerRepository; import mineplex.serverdata.servers.ServerRepository;
import net.md_5.bungee.api.ServerPing.Players; import net.md_5.bungee.api.ServerPing.Players;
@ -46,10 +47,10 @@ public class PlayerCount implements Listener, Runnable
Region.ALL, BungeeServer.class, "bungeeServers"); Region.ALL, BungeeServer.class, "bungeeServers");
if (_region == Region.US) if (_region == Region.US)
_secondRepository = new RedisDataRepository<BungeeServer>(new ConnectionData("10.81.1.156", 6379), new ConnectionData("10.81.1.156", 6377), _secondRepository = new RedisDataRepository<BungeeServer>(new ConnectionData("10.81.1.156", 6379, ConnectionType.MASTER, "ServerStatus"), new ConnectionData("10.81.1.156", 6377, ConnectionType.SLAVE, "ServerStatus"),
Region.ALL, BungeeServer.class, "bungeeServers"); Region.ALL, BungeeServer.class, "bungeeServers");
else else
_secondRepository = new RedisDataRepository<BungeeServer>(new ConnectionData("10.3.203.80", 6379), new ConnectionData("10.3.203.80", 6377), _secondRepository = new RedisDataRepository<BungeeServer>(new ConnectionData("10.3.203.80", 6379, ConnectionType.MASTER, "ServerStatus"), new ConnectionData("10.3.203.80", 6377, ConnectionType.SLAVE, "ServerStatus"),
Region.ALL, BungeeServer.class, "bungeeServers"); Region.ALL, BungeeServer.class, "bungeeServers");
} }

View File

@ -26,6 +26,7 @@ import mineplex.serverdata.data.DataRepository;
import mineplex.serverdata.redis.RedisDataRepository; import mineplex.serverdata.redis.RedisDataRepository;
import mineplex.serverdata.servers.ConnectionData; import mineplex.serverdata.servers.ConnectionData;
import mineplex.serverdata.servers.ServerManager; import mineplex.serverdata.servers.ServerManager;
import mineplex.serverdata.servers.ConnectionData.ConnectionType;
public class BungeeRotator public class BungeeRotator
{ {
@ -105,7 +106,7 @@ public class BungeeRotator
_repository = new RedisDataRepository<BungeeServer>(ServerManager.getMasterConnection(), ServerManager.getSlaveConnection(), _repository = new RedisDataRepository<BungeeServer>(ServerManager.getMasterConnection(), ServerManager.getSlaveConnection(),
Region.ALL, BungeeServer.class, "bungeeServers"); Region.ALL, BungeeServer.class, "bungeeServers");
_secondRepository = new RedisDataRepository<BungeeServer>(new ConnectionData("10.81.1.156", 6379), new ConnectionData("10.81.1.156", 6377), _secondRepository = new RedisDataRepository<BungeeServer>(new ConnectionData("10.33.53.16", 6379, ConnectionType.MASTER, "ServerStatus"), new ConnectionData("10.33.53.16", 6377, ConnectionType.SLAVE, "ServerStatus"),
Region.ALL, BungeeServer.class, "bungeeServers"); Region.ALL, BungeeServer.class, "bungeeServers");
//_ipRepository = new PlayerStatsRepository(); //_ipRepository = new PlayerStatsRepository();

View File

@ -83,7 +83,7 @@ public class ServerManager
*/ */
public static ConnectionData getConnection(boolean writeable) public static ConnectionData getConnection(boolean writeable)
{ {
return getConnection(writeable, null); return getConnection(writeable, "DefaultConnection");
} }
/** /**