diff --git a/Plugins/Mineplex.Bungee.Mineplexer/src/mineplex/bungee/lobbyBalancer/LobbySorter.java b/Plugins/Mineplex.Bungee.Mineplexer/src/mineplex/bungee/lobbyBalancer/LobbySorter.java index 9dd820811..1497c4636 100644 --- a/Plugins/Mineplex.Bungee.Mineplexer/src/mineplex/bungee/lobbyBalancer/LobbySorter.java +++ b/Plugins/Mineplex.Bungee.Mineplexer/src/mineplex/bungee/lobbyBalancer/LobbySorter.java @@ -13,10 +13,10 @@ public class LobbySorter implements Comparator if (first.Players == 999) return 1; - if (first.MaxPlayers - first.Players > 10 && second.MaxPlayers - second.Players <= 10) + if (first.MaxPlayers - first.Players > 15 && second.MaxPlayers - second.Players <= 15) return -1; - if (second.MaxPlayers - second.Players > 10 && first.MaxPlayers - first.Players <= 10) + if (second.MaxPlayers - second.Players > 15 && first.MaxPlayers - first.Players <= 15) return 1; if (first.Players < (first.MaxPlayers / 2) && second.Players >= (second.MaxPlayers / 2)) diff --git a/Plugins/Mineplex.Core.Common/src/mineplex/core/common/CurrencyType.java b/Plugins/Mineplex.Core.Common/src/mineplex/core/common/CurrencyType.java index 6cc400874..de5a6ca25 100644 --- a/Plugins/Mineplex.Core.Common/src/mineplex/core/common/CurrencyType.java +++ b/Plugins/Mineplex.Core.Common/src/mineplex/core/common/CurrencyType.java @@ -5,7 +5,7 @@ import org.bukkit.Material; public enum CurrencyType { Tokens(" Tokens", Material.EMERALD), - Coins(" Coins", Material.GOLD_INGOT), + Coins(" Coins", Material.GOLD_INGOT), Gems("Gems", Material.DIAMOND); private String _prefix; diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/Hub.java b/Plugins/Mineplex.Hub/src/mineplex/hub/Hub.java index 9ce762f91..8323e96ee 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/Hub.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/Hub.java @@ -56,7 +56,7 @@ public class Hub extends JavaPlugin implements INautilusPlugin, IRelation @Override public void onEnable() { - getConfig().addDefault(WEB_CONFIG, "http://api.mineplex.com/"); + getConfig().addDefault(WEB_CONFIG, "http://api.mineplex.com/"); getConfig().set(WEB_CONFIG, getConfig().getString(WEB_CONFIG)); saveConfig(); diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/HubManager.java b/Plugins/Mineplex.Hub/src/mineplex/hub/HubManager.java index ed2e1fb96..76c636021 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/HubManager.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/HubManager.java @@ -68,7 +68,7 @@ import mineplex.minecraft.game.core.condition.ConditionManager; public class HubManager extends MiniClientPlugin { - public String Mode = "Christmas"; + public String Mode = "Normal"; private BlockRestore _blockRestore; private CoreClientManager _clientManager; diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/modules/NewsManager.java b/Plugins/Mineplex.Hub/src/mineplex/hub/modules/NewsManager.java index c510c9f44..f3462bd78 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/modules/NewsManager.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/modules/NewsManager.java @@ -34,8 +34,6 @@ public class NewsManager extends MiniPlugin _news = new String[] { "Europe Servers: " + C.cGreen + C.Bold + "BACK ONLINE" + ChatColor.RESET + "!", - "Christmas Sale: " + C.cGreen + C.Bold + "50% Off!" + ChatColor.RESET + "!", - "New Game: " + C.cGold + C.Bold + "Christmas Chaos" + ChatColor.RESET + "!", "New SSM Kit: " + C.cYellow + C.Bold + "Magma Cube" + ChatColor.RESET + "!", "New Rank: " + C.cPurple + C.Bold + "Hero Rank" + ChatColor.RESET + "!", }; diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/LobbyMenu.java b/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/LobbyMenu.java index 9548f2c2e..e36a10fff 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/LobbyMenu.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/LobbyMenu.java @@ -25,7 +25,7 @@ public class LobbyMenu extends ShopPageBase implements public LobbyMenu(ServerManager plugin, LobbyShop lobbyShop, CoreClientManager clientManager, DonationManager donationManager, String name, Player player, String serverGroup) { - super(plugin, lobbyShop, clientManager, donationManager, name, player, 36); + super(plugin, lobbyShop, clientManager, donationManager, name, player, 54); _serverGroup = serverGroup; @@ -55,7 +55,7 @@ public class LobbyMenu extends ShopPageBase implements Material status = Material.IRON_BLOCK; List lore = new ArrayList(); - if (slot >= 36) + if (slot >= 54) break; if (serverInfo.Name.equalsIgnoreCase(Plugin.getStatusManager().getCurrentServerName())) @@ -83,7 +83,7 @@ public class LobbyMenu extends ShopPageBase implements slot += 1; } - while (slot < 36) + while (slot < 54) { setItem(slot, null); slot++; diff --git a/Plugins/Mineplex.ServerMonitor/src/mineplex/servermonitor/Repository.java b/Plugins/Mineplex.ServerMonitor/src/mineplex/servermonitor/Repository.java index 1c10f4687..b678c43fb 100644 --- a/Plugins/Mineplex.ServerMonitor/src/mineplex/servermonitor/Repository.java +++ b/Plugins/Mineplex.ServerMonitor/src/mineplex/servermonitor/Repository.java @@ -17,11 +17,11 @@ public class Repository private String _password = "y2D4atu3Pene2asw"; private static String CREATE_TABLE = "CREATE TABLE IF NOT EXISTS ServerStatus (id INT NOT NULL AUTO_INCREMENT, serverName VARCHAR(256), serverGroup VARCHAR(256), address VARCHAR(256), updated LONG, lastTimeWithPlayers LONG, motd VARCHAR(256), players INT, maxPlayers INT, tps INT, ram INT, maxRam INT, PRIMARY KEY (id));"; - private static String RETRIEVE_OLD_SERVER_STATUSES = "SELECT ServerStatus.serverName, ServerStatus.address, motd, players, maxPlayers FROM ServerStatus INNER JOIN DynamicServers ON ServerStatus.address LIKE CONCAT(DynamicServers.privateAddress, '%') WHERE DynamicServers.US = false AND TIME_TO_SEC(TIMEDIFF(now(), ServerStatus.updated)) > 10;"; + private static String RETRIEVE_OLD_SERVER_STATUSES = "SELECT ServerStatus.serverName, DynamicServers.address, ServerStatus.address, motd, players, maxPlayers FROM ServerStatus INNER JOIN DynamicServers ON ServerStatus.address LIKE CONCAT(DynamicServers.privateAddress, '%') WHERE DynamicServers.US = false AND TIME_TO_SEC(TIMEDIFF(now(), ServerStatus.updated)) > 10;"; private static String CREATE_DYNAMIC_TABLE = "CREATE TABLE IF NOT EXISTS DynamicServers (id INT NOT NULL AUTO_INCREMENT, serverName VARCHAR(256), address VARCHAR(256), privateAddress VARCHAR(256), US BOOLEAN NOT NULL DEFAULT 'true', PRIMARY KEY (id));"; private static String RETRIEVE_AVAILABLE_SERVERS = "SELECT DynamicServers.serverName, DynamicServers.address, DynamicServers.privateAddress, DynamicServers.US, DynamicServers.availableCpu, DynamicServers.availableRam, ServerStatus.serverGroup, COUNT(*) As serverCount FROM DynamicServers LEFT JOIN ServerStatus ON ServerStatus.address LIKE CONCAT(DynamicServers.privateAddress, '%') WHERE DynamicServers.US = false GROUP BY DynamicServers.address, ServerStatus.serverGroup;"; - private static String RETRIEVE_SERVERGROUP_STATUSES = "SELECT ServerStatus.serverName, serverGroup, motd, ServerStatus.address, players, maxPlayers, case when TIME_TO_SEC(TIMEDIFF(now(), ServerStatus.lastTimeWithPlayers)) > 300 then 1 else 0 end as empty FROM ServerStatus INNER JOIN DynamicServers ON ServerStatus.address LIKE CONCAT(DynamicServers.privateAddress, '%') WHERE DynamicServers.US = false AND TIME_TO_SEC(TIMEDIFF(now(), ServerStatus.updated)) <= 10"; + private static String RETRIEVE_SERVERGROUP_STATUSES = "SELECT ServerStatus.serverName, serverGroup, motd, DynamicServers.address, ServerStatus.address, players, maxPlayers, case when TIME_TO_SEC(TIMEDIFF(now(), ServerStatus.lastTimeWithPlayers)) > 300 then 1 else 0 end as empty FROM ServerStatus INNER JOIN DynamicServers ON ServerStatus.address LIKE CONCAT(DynamicServers.privateAddress, '%') WHERE DynamicServers.US = false AND TIME_TO_SEC(TIMEDIFF(now(), ServerStatus.updated)) <= 10"; private static String RETRIEVE_SERVER_GROUP_DATA = "SELECT groupName, prefix, scriptName, requiredRam, cpuRequired, requiredTotal, requiredJoinable FROM ServerGroups;"; private static String DELETE_SERVER_STATUS = "DELETE FROM ServerStatus WHERE address = ? AND serverName = ?;"; @@ -111,12 +111,13 @@ public class Repository serverStatusData.Name = resultSet.getString(1); - String addressPortString = resultSet.getString(2); - serverStatusData.Address = addressPortString.split(":")[0]; + serverStatusData.Address = resultSet.getString(2); + String addressPortString = resultSet.getString(3); + serverStatusData.PrivateAddress = addressPortString.split(":")[0]; serverStatusData.Port = Integer.parseInt(addressPortString.split(":")[1]); - serverStatusData.Motd = resultSet.getString(3); - serverStatusData.Players = resultSet.getInt(4); - serverStatusData.MaxPlayers = resultSet.getInt(5); + serverStatusData.Motd = resultSet.getString(4); + serverStatusData.Players = resultSet.getInt(5); + serverStatusData.MaxPlayers = resultSet.getInt(6); serverData.add(serverStatusData); } @@ -176,12 +177,13 @@ public class Repository serverStatusData.Name = resultSet.getString(1); String serverGroup = resultSet.getString(2); serverStatusData.Motd = resultSet.getString(3); - String addressPortString = resultSet.getString(4); - serverStatusData.Address = addressPortString.split(":")[0]; + serverStatusData.Address = resultSet.getString(4); + String addressPortString = resultSet.getString(5); + serverStatusData.PrivateAddress = addressPortString.split(":")[0]; serverStatusData.Port = Integer.parseInt(addressPortString.split(":")[1]); - serverStatusData.Players = resultSet.getInt(5); - serverStatusData.MaxPlayers = resultSet.getInt(6); - serverStatusData.Empty = resultSet.getBoolean(7); + serverStatusData.Players = resultSet.getInt(6); + serverStatusData.MaxPlayers = resultSet.getInt(7); + serverStatusData.Empty = resultSet.getBoolean(8); if (!groupData.containsKey(serverGroup)) { @@ -390,7 +392,7 @@ public class Repository connection = DriverManager.getConnection(_connectionString, _userName, _password); preparedStatement = connection.prepareStatement(DELETE_SERVER_STATUS); - preparedStatement.setString(1, serverToKill.Address + ":" + serverToKill.Port); + preparedStatement.setString(1, serverToKill.PrivateAddress + ":" + serverToKill.Port); preparedStatement.setString(2, serverToKill.Name); preparedStatement.execute(); } diff --git a/Plugins/Mineplex.ServerMonitor/src/mineplex/servermonitor/ServerStatusData.java b/Plugins/Mineplex.ServerMonitor/src/mineplex/servermonitor/ServerStatusData.java index 092498d42..1412dff80 100644 --- a/Plugins/Mineplex.ServerMonitor/src/mineplex/servermonitor/ServerStatusData.java +++ b/Plugins/Mineplex.ServerMonitor/src/mineplex/servermonitor/ServerStatusData.java @@ -7,6 +7,7 @@ public class ServerStatusData public int Players; public int MaxPlayers; public String Address; + public String PrivateAddress; public int Port; public boolean Empty = false; } diff --git a/Website/LOCWebsite.suo b/Website/LOCWebsite.suo index ba831d3d2..3b2fdd7c3 100644 Binary files a/Website/LOCWebsite.suo and b/Website/LOCWebsite.suo differ