Added team and portal location info to server group.

This commit is contained in:
Jonathan Williams 2015-08-02 17:52:51 -05:00
parent 41189b9838
commit f520908f8d

View File

@ -57,6 +57,11 @@ public class ServerGroup
private boolean _staffOnly; private boolean _staffOnly;
private String _resourcePack = ""; private String _resourcePack = "";
private String _portalBottomCornerLocation = "";
private String _portalTopCornerLocation = "";
private String _teamServerKey = "";
private Region _region; private Region _region;
private Set<MinecraftServer> _servers; private Set<MinecraftServer> _servers;
@ -101,6 +106,9 @@ public class ServerGroup
_resourcePack = data.containsKey("resourcePack") ? data.get("resourcePack") : ""; _resourcePack = data.containsKey("resourcePack") ? data.get("resourcePack") : "";
_host = data.get("host"); _host = data.get("host");
_region = data.containsKey("region") ? Region.valueOf(data.get("region")) : Region.ALL; _region = data.containsKey("region") ? Region.valueOf(data.get("region")) : Region.ALL;
_teamServerKey = data.containsKey("teamServerKey") ? data.get("teamServerKey") : "";
_portalBottomCornerLocation = data.containsKey("portalBottomCornerLocation") ? data.get("portalBottomCornerLocation") : "";
_portalTopCornerLocation = data.containsKey("portalTopCornerLocation") ? data.get("portalTopCornerLocation") : "";
if (serverStatuses != null) if (serverStatuses != null)
parseServers(serverStatuses); parseServers(serverStatuses);
@ -109,7 +117,8 @@ public class ServerGroup
public ServerGroup(String name, String prefix, String host, int ram, int cpu, int totalServers, int joinable, int portSection, boolean arcade, String worldZip, String plugin, String configPath public ServerGroup(String name, String prefix, String host, int ram, int cpu, int totalServers, int joinable, int portSection, boolean arcade, String worldZip, String plugin, String configPath
, int minPlayers, int maxPlayers, boolean pvp, boolean tournament, boolean tournamentPoints, String games, String serverType, boolean noCheat, boolean worldEdit, boolean teamRejoin , int minPlayers, int maxPlayers, boolean pvp, boolean tournament, boolean tournamentPoints, String games, String serverType, boolean noCheat, boolean worldEdit, boolean teamRejoin
, boolean teamAutoJoin, boolean teamForceBalance, boolean gameAutoStart, boolean gameTimeout, boolean rewardGems, boolean rewardItems, boolean rewardStats , boolean teamAutoJoin, boolean teamForceBalance, boolean gameAutoStart, boolean gameTimeout, boolean rewardGems, boolean rewardItems, boolean rewardStats
, boolean rewardAchievements, boolean hotbarInventory, boolean hotbarHubClock, boolean playerKickIdle, boolean staffOnly, boolean whitelist, String resourcePack, Region region) , boolean rewardAchievements, boolean hotbarInventory, boolean hotbarHubClock, boolean playerKickIdle, boolean staffOnly, boolean whitelist, String resourcePack, Region region
, String teamServerKey, String portalBottomCornerLocation, String portalTopCornerLocation)
{ {
_name = name; _name = name;
_prefix = prefix; _prefix = prefix;
@ -148,6 +157,9 @@ public class ServerGroup
_whitelist = whitelist; _whitelist = whitelist;
_resourcePack = resourcePack; _resourcePack = resourcePack;
_region = region; _region = region;
_teamServerKey = teamServerKey;
_portalBottomCornerLocation = portalBottomCornerLocation;
_portalTopCornerLocation = portalTopCornerLocation;
} }
public String getName() { return _name; } public String getName() { return _name; }
@ -196,6 +208,11 @@ public class ServerGroup
public String getResourcePack() { return _resourcePack; } public String getResourcePack() { return _resourcePack; }
public Region getRegion() { return _region; } public Region getRegion() { return _region; }
public String getTeamServerKey() { return _teamServerKey; }
public String getPortalBottomCornerLocation() { return _portalBottomCornerLocation; }
public String getPortalTopCornerLocation() { return _portalTopCornerLocation; }
public Set<MinecraftServer> getServers() { return _servers; } public Set<MinecraftServer> getServers() { return _servers; }
public int getServerCount() public int getServerCount()
@ -350,6 +367,9 @@ public class ServerGroup
_dataMap.put("resourcePack", _resourcePack); _dataMap.put("resourcePack", _resourcePack);
_dataMap.put("host", _host); _dataMap.put("host", _host);
_dataMap.put("region", _region.name()); _dataMap.put("region", _region.name());
_dataMap.put("teamServerKey", _teamServerKey);
_dataMap.put("portalBottomCornerLocation", _portalBottomCornerLocation);
_dataMap.put("portalTopCornerLocation", _portalTopCornerLocation);
} }
return _dataMap; return _dataMap;