From c6e4c5c5e4f38242ff51f6dad933d652536b387d Mon Sep 17 00:00:00 2001 From: Jonathan Williams Date: Tue, 30 Jun 2015 03:49:53 -0400 Subject: [PATCH] Fixed mineplexer server status link. Fixed issue with ServerManager and default connection. --- .../src/mineplex/bungee/playerCount/PlayerCount.java | 5 +++-- .../src/mineplex/bungee/BungeeRotator.java | 3 ++- .../src/mineplex/serverdata/servers/ServerManager.java | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Plugins/Mineplex.Bungee.Mineplexer/src/mineplex/bungee/playerCount/PlayerCount.java b/Plugins/Mineplex.Bungee.Mineplexer/src/mineplex/bungee/playerCount/PlayerCount.java index 223bfcc7d..cc097cc55 100644 --- a/Plugins/Mineplex.Bungee.Mineplexer/src/mineplex/bungee/playerCount/PlayerCount.java +++ b/Plugins/Mineplex.Bungee.Mineplexer/src/mineplex/bungee/playerCount/PlayerCount.java @@ -10,6 +10,7 @@ import mineplex.serverdata.data.BungeeServer; import mineplex.serverdata.data.DataRepository; import mineplex.serverdata.redis.RedisDataRepository; import mineplex.serverdata.servers.ConnectionData; +import mineplex.serverdata.servers.ConnectionData.ConnectionType; import mineplex.serverdata.servers.ServerManager; import mineplex.serverdata.servers.ServerRepository; import net.md_5.bungee.api.ServerPing.Players; @@ -46,10 +47,10 @@ public class PlayerCount implements Listener, Runnable Region.ALL, BungeeServer.class, "bungeeServers"); if (_region == Region.US) - _secondRepository = new RedisDataRepository(new ConnectionData("10.81.1.156", 6379), new ConnectionData("10.81.1.156", 6377), + _secondRepository = new RedisDataRepository(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"); else - _secondRepository = new RedisDataRepository(new ConnectionData("10.3.203.80", 6379), new ConnectionData("10.3.203.80", 6377), + _secondRepository = new RedisDataRepository(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"); } diff --git a/Plugins/Mineplex.BungeeRotator/src/mineplex/bungee/BungeeRotator.java b/Plugins/Mineplex.BungeeRotator/src/mineplex/bungee/BungeeRotator.java index b37cdf486..1770dece4 100644 --- a/Plugins/Mineplex.BungeeRotator/src/mineplex/bungee/BungeeRotator.java +++ b/Plugins/Mineplex.BungeeRotator/src/mineplex/bungee/BungeeRotator.java @@ -26,6 +26,7 @@ import mineplex.serverdata.data.DataRepository; import mineplex.serverdata.redis.RedisDataRepository; import mineplex.serverdata.servers.ConnectionData; import mineplex.serverdata.servers.ServerManager; +import mineplex.serverdata.servers.ConnectionData.ConnectionType; public class BungeeRotator { @@ -105,7 +106,7 @@ public class BungeeRotator _repository = new RedisDataRepository(ServerManager.getMasterConnection(), ServerManager.getSlaveConnection(), Region.ALL, BungeeServer.class, "bungeeServers"); - _secondRepository = new RedisDataRepository(new ConnectionData("10.81.1.156", 6379), new ConnectionData("10.81.1.156", 6377), + _secondRepository = new RedisDataRepository(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"); //_ipRepository = new PlayerStatsRepository(); diff --git a/Plugins/Mineplex.ServerData/src/mineplex/serverdata/servers/ServerManager.java b/Plugins/Mineplex.ServerData/src/mineplex/serverdata/servers/ServerManager.java index 44b62e013..1c173ae09 100644 --- a/Plugins/Mineplex.ServerData/src/mineplex/serverdata/servers/ServerManager.java +++ b/Plugins/Mineplex.ServerData/src/mineplex/serverdata/servers/ServerManager.java @@ -83,7 +83,7 @@ public class ServerManager */ public static ConnectionData getConnection(boolean writeable) { - return getConnection(writeable, null); + return getConnection(writeable, "DefaultConnection"); } /**