Merge branch 'master' of ssh://184.154.0.242:7999/min/mineplex
This commit is contained in:
commit
fa2a585dac
@ -39,7 +39,7 @@ public class MotdManager implements Listener, Runnable
|
||||
if (new File("updateMOTD.dat").exists())
|
||||
{
|
||||
List<String> lines = new ArrayList<String>();
|
||||
lines.add(" §f§l◄ §6§lNEW ARCADE GAME §f§l▬ §c§lBOMB LOBBERS §f§l►");
|
||||
lines.add(" §f§l◄ §6§lNEW §f§l▬ §c§lSSM/SG/SW Teams§f§l ▬ §c§lMPS Update §f§l►");
|
||||
//lines.add(" §d§lRank Sale §a§l40% Off");
|
||||
//lines.add(" §f§l◄§c§lMAINTENANCE§f§l►");
|
||||
|
||||
|
@ -9,6 +9,7 @@ import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Random;
|
||||
@ -86,7 +87,6 @@ public class ServerManager extends MiniPlugin
|
||||
|
||||
private NautHashMap<String, Long> _queueCooldowns = new NautHashMap<String, Long>();
|
||||
private NautHashMap<String, HashSet<ServerInfo>> _serverKeyInfoMap = new NautHashMap<String, HashSet<ServerInfo>>();
|
||||
private NautHashMap<String, String> _serverKeyTagMap = new NautHashMap<String, String>();
|
||||
private NautHashMap<String, Integer> _serverPlayerCounts = new NautHashMap<String, Integer>();
|
||||
private NautHashMap<String, ServerNpcShop> _serverNpcShopMap = new NautHashMap<String, ServerNpcShop>();
|
||||
private NautHashMap<String, ServerInfo> _serverInfoMap = new NautHashMap<String, ServerInfo>();
|
||||
@ -189,13 +189,13 @@ public class ServerManager extends MiniPlugin
|
||||
|
||||
if (serverName != null)
|
||||
{
|
||||
List<ServerInfo> serverList = new ArrayList<ServerInfo>(GetServerList(serverName));
|
||||
List<ServerInfo> serverList = new ArrayList<ServerInfo>(getServerList(serverName));
|
||||
|
||||
int slots = 1;
|
||||
|
||||
if (serverList.size() > 0)
|
||||
{
|
||||
slots = GetRequiredSlots(player, serverList.get(0).ServerType);
|
||||
slots = getRequiredSlots(player, serverList.get(0).ServerType);
|
||||
}
|
||||
|
||||
try
|
||||
@ -206,7 +206,7 @@ public class ServerManager extends MiniPlugin
|
||||
{
|
||||
if ((serverInfo.MOTD.contains("Starting") || serverInfo.MOTD.contains("Recruiting") || serverInfo.MOTD.contains("Waiting") || serverInfo.MOTD.contains("Cup")) && (serverInfo.MaxPlayers - serverInfo.CurrentPlayers) >= slots)
|
||||
{
|
||||
SelectServer(player, serverInfo);
|
||||
selectServer(player, serverInfo);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -292,7 +292,7 @@ public class ServerManager extends MiniPlugin
|
||||
return timeLeft;
|
||||
}
|
||||
|
||||
public void RemoveServer(String serverName)
|
||||
public void removeServer(String serverName)
|
||||
{
|
||||
for (String key : _serverKeyInfoMap.keySet())
|
||||
{
|
||||
@ -304,19 +304,15 @@ public class ServerManager extends MiniPlugin
|
||||
|
||||
public void addServerGroup(ServerGroup serverGroup)
|
||||
{
|
||||
_serverKeyInfoMap.put(serverGroup.getName(), new HashSet<ServerInfo>());
|
||||
_serverKeyTagMap.put(serverGroup.getPrefix(), serverGroup.getName());
|
||||
|
||||
if (!serverGroup.getServerNpcName().isEmpty())
|
||||
_serverKeyTagMap.put(serverGroup.getServerNpcName(), serverGroup.getName());
|
||||
_serverKeyInfoMap.put(serverGroup.getPrefix(), new HashSet<ServerInfo>());
|
||||
}
|
||||
|
||||
public void AddServerNpc(ServerGroup serverGroup)
|
||||
public void addServerNpc(ServerGroup serverGroup)
|
||||
{
|
||||
_serverNpcShopMap.put(serverGroup.getServerNpcName(), new ServerNpcShop(this, _clientManager, _donationManager, serverGroup));
|
||||
}
|
||||
|
||||
public void RemoveServerNpc(String serverNpcName)
|
||||
public void removeServerNpc(String serverNpcName)
|
||||
{
|
||||
Set<ServerInfo> mappedServers = _serverKeyInfoMap.remove(serverNpcName);
|
||||
_serverNpcShopMap.remove(serverNpcName);
|
||||
@ -348,22 +344,23 @@ public class ServerManager extends MiniPlugin
|
||||
}
|
||||
}
|
||||
|
||||
public Collection<ServerInfo> GetServerList(String serverNpcName)
|
||||
public Collection<ServerInfo> getServerList(String serverNpcName)
|
||||
{
|
||||
System.out.println("contains?" + _serverKeyInfoMap.containsKey(serverNpcName));
|
||||
return _serverKeyInfoMap.get(serverNpcName);
|
||||
}
|
||||
|
||||
public Set<String> GetAllServers()
|
||||
public Set<String> getAllServers()
|
||||
{
|
||||
return _serverInfoMap.keySet();
|
||||
}
|
||||
|
||||
public ServerInfo GetServerInfo(String serverName)
|
||||
public ServerInfo getServerInfo(String serverName)
|
||||
{
|
||||
return _serverInfoMap.get(serverName);
|
||||
}
|
||||
|
||||
public boolean HasServerNpc(String serverNpcName)
|
||||
public boolean hasServerNpc(String serverNpcName)
|
||||
{
|
||||
return _serverKeyInfoMap.containsKey(serverNpcName);
|
||||
}
|
||||
@ -449,9 +446,9 @@ public class ServerManager extends MiniPlugin
|
||||
|
||||
_serverUpdate.put(serverStatus.getName(), System.currentTimeMillis());
|
||||
|
||||
if (_serverKeyTagMap.containsKey(tag))
|
||||
if (_serverKeyInfoMap.containsKey(tag))
|
||||
{
|
||||
_serverKeyInfoMap.get(_serverKeyTagMap.get(tag)).add(serverInfo);
|
||||
_serverKeyInfoMap.get(tag).add(serverInfo);
|
||||
|
||||
if (!_serverPlayerCounts.containsKey(tag))
|
||||
_serverPlayerCounts.put(tag, 0);
|
||||
@ -484,7 +481,7 @@ public class ServerManager extends MiniPlugin
|
||||
updateCooldowns();
|
||||
}
|
||||
|
||||
public void Help(Player caller, String message)
|
||||
public void help(Player caller, String message)
|
||||
{
|
||||
UtilPlayer.message(caller, F.main(_moduleName, "Commands List:"));
|
||||
UtilPlayer.message(caller, F.help("/servernpc create <name>", "<name> is name of npc.", Rank.OWNER));
|
||||
@ -499,9 +496,9 @@ public class ServerManager extends MiniPlugin
|
||||
UtilPlayer.message(caller, F.main(_moduleName, ChatColor.RED + message));
|
||||
}
|
||||
|
||||
public void Help(Player caller)
|
||||
public void help(Player caller)
|
||||
{
|
||||
Help(caller, null);
|
||||
help(caller, null);
|
||||
}
|
||||
|
||||
public PartyManager getPartyManager()
|
||||
@ -509,7 +506,7 @@ public class ServerManager extends MiniPlugin
|
||||
return _partyManager;
|
||||
}
|
||||
|
||||
public void SelectServer(org.bukkit.entity.Player player, ServerInfo serverInfo)
|
||||
public void selectServer(org.bukkit.entity.Player player, ServerInfo serverInfo)
|
||||
{
|
||||
Party party = _partyManager.GetParty(player);
|
||||
|
||||
@ -539,7 +536,7 @@ public class ServerManager extends MiniPlugin
|
||||
|
||||
if (bestServer != null)
|
||||
{
|
||||
SelectServer(player, bestServer);
|
||||
selectServer(player, bestServer);
|
||||
addCooldown(player);
|
||||
}
|
||||
}
|
||||
@ -563,13 +560,13 @@ public class ServerManager extends MiniPlugin
|
||||
|
||||
private void updateCooldowns()
|
||||
{
|
||||
for (String playerName : _queueCooldowns.keySet())
|
||||
for (Iterator<String> playerIterator = _queueCooldowns.keySet().iterator(); playerIterator.hasNext();)
|
||||
{
|
||||
Player player = Bukkit.getPlayer(playerName);
|
||||
Player player = Bukkit.getPlayer(playerIterator.next());
|
||||
|
||||
if (player == null || !isOnCooldown(player))
|
||||
{
|
||||
_queueCooldowns.remove(playerName);
|
||||
playerIterator.remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -580,12 +577,7 @@ public class ServerManager extends MiniPlugin
|
||||
*/
|
||||
public ServerInfo getBestServer(Player player, String serverKey)
|
||||
{
|
||||
if (_serverKeyTagMap.containsKey(serverKey)) // Update key to full-name if a tag pair exists
|
||||
{
|
||||
serverKey = _serverKeyTagMap.get(serverKey);
|
||||
}
|
||||
|
||||
Collection<ServerInfo> serverList = GetServerList(serverKey);
|
||||
Collection<ServerInfo> serverList = getServerList(serverKey);
|
||||
if (serverList == null) return null;
|
||||
|
||||
List<ServerInfo> servers = new ArrayList<ServerInfo>(serverList);
|
||||
@ -616,7 +608,7 @@ public class ServerManager extends MiniPlugin
|
||||
public List<ServerInfo> fetchOpenServers(Player player, List<ServerInfo> servers, int count)
|
||||
{
|
||||
List<ServerInfo> results = new ArrayList<ServerInfo>();
|
||||
int requiredSlots = (servers.size() > 0) ? GetRequiredSlots(player, servers.get(0).ServerType) : 0;
|
||||
int requiredSlots = (servers.size() > 0) ? getRequiredSlots(player, servers.get(0).ServerType) : 0;
|
||||
|
||||
for (ServerInfo server : servers)
|
||||
{
|
||||
@ -639,7 +631,7 @@ public class ServerManager extends MiniPlugin
|
||||
return serverInfo.MOTD.contains("Progress") || serverInfo.MOTD.contains("Restarting");
|
||||
}
|
||||
|
||||
public void ListServerNpcs(Player caller)
|
||||
public void listServerNpcs(Player caller)
|
||||
{
|
||||
UtilPlayer.message(caller, F.main(getName(), "Listing Server Npcs:"));
|
||||
|
||||
@ -649,7 +641,7 @@ public class ServerManager extends MiniPlugin
|
||||
}
|
||||
}
|
||||
|
||||
public void ListServers(Player caller, String serverNpcName)
|
||||
public void listServers(Player caller, String serverNpcName)
|
||||
{
|
||||
UtilPlayer.message(caller, F.main(getName(), "Listing Servers for '" + serverNpcName + "':"));
|
||||
|
||||
@ -659,7 +651,7 @@ public class ServerManager extends MiniPlugin
|
||||
}
|
||||
}
|
||||
|
||||
public void ListOfflineServers(Player caller)
|
||||
public void listOfflineServers(Player caller)
|
||||
{
|
||||
UtilPlayer.message(caller, F.main(getName(), "Listing Offline Servers:"));
|
||||
|
||||
@ -681,8 +673,6 @@ public class ServerManager extends MiniPlugin
|
||||
{
|
||||
_serverKeyInfoMap.get(npcName).clear();
|
||||
}
|
||||
|
||||
_serverKeyTagMap.clear();
|
||||
|
||||
Region region = getPlugin().getConfig().getBoolean("serverstatus.us") ? Region.US : Region.EU;
|
||||
|
||||
@ -693,7 +683,7 @@ public class ServerManager extends MiniPlugin
|
||||
addServerGroup(serverGroup);
|
||||
|
||||
if (!serverGroup.getServerNpcName().isEmpty())
|
||||
AddServerNpc(serverGroup);
|
||||
addServerNpc(serverGroup);
|
||||
|
||||
if (!serverGroup.getPortalBottomCornerLocation().isEmpty() && !serverGroup.getPortalTopCornerLocation().isEmpty())
|
||||
{
|
||||
@ -729,13 +719,13 @@ public class ServerManager extends MiniPlugin
|
||||
ServerGroup eventGroup = new ServerGroup("Event", "Event Servers", "EVENT");
|
||||
ServerGroup mpsGroup = new ServerGroup("MPS", "Mineplex Player Servers", "MPS");
|
||||
|
||||
AddServerNpc(eventGroup);
|
||||
addServerNpc(eventGroup);
|
||||
addServerGroup(eventGroup);
|
||||
AddServerNpc(mpsGroup);
|
||||
addServerNpc(mpsGroup);
|
||||
addServerGroup(mpsGroup);
|
||||
}
|
||||
|
||||
public int GetRequiredSlots(Player player, String serverType)
|
||||
public int getRequiredSlots(Player player, String serverType)
|
||||
{
|
||||
int slots = 0;
|
||||
|
||||
@ -772,6 +762,18 @@ public class ServerManager extends MiniPlugin
|
||||
{
|
||||
return _serverNpcShopMap.get("Mixed Arcade");
|
||||
}
|
||||
|
||||
public ServerNpcShop getServerNPCShopByName(String name)
|
||||
{
|
||||
for(String shop : _serverNpcShopMap.keySet())
|
||||
{
|
||||
if(shop.equalsIgnoreCase(name))
|
||||
{
|
||||
return _serverNpcShopMap.get(shop);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public ServerNpcShop getSuperSmashMobsShop()
|
||||
{
|
||||
|
@ -35,7 +35,7 @@ public class LobbyMenu extends ShopPageBase<ServerManager, LobbyShop> implements
|
||||
@Override
|
||||
protected void buildPage()
|
||||
{
|
||||
List<ServerInfo> serverList = new ArrayList<ServerInfo>(getPlugin().GetServerList(_serverGroup));
|
||||
List<ServerInfo> serverList = new ArrayList<ServerInfo>(getPlugin().getServerList(_serverGroup));
|
||||
|
||||
try
|
||||
{
|
||||
@ -99,7 +99,7 @@ public class LobbyMenu extends ShopPageBase<ServerManager, LobbyShop> implements
|
||||
@Override
|
||||
public void SelectServer(org.bukkit.entity.Player player, ServerInfo serverInfo)
|
||||
{
|
||||
int slots = getPlugin().GetRequiredSlots(player, serverInfo.ServerType);
|
||||
int slots = getPlugin().getRequiredSlots(player, serverInfo.ServerType);
|
||||
|
||||
if (serverInfo.MaxPlayers - serverInfo.CurrentPlayers < slots)
|
||||
{
|
||||
@ -107,6 +107,6 @@ public class LobbyMenu extends ShopPageBase<ServerManager, LobbyShop> implements
|
||||
return;
|
||||
}
|
||||
|
||||
getPlugin().SelectServer(player, serverInfo);
|
||||
getPlugin().selectServer(player, serverInfo);
|
||||
}
|
||||
}
|
||||
|
@ -71,7 +71,7 @@ public class ServerGameMenu extends ShopPageBase<ServerManager, QuickShop>
|
||||
ChatColor.RESET + "fight others to be the last man standing. ",
|
||||
ChatColor.RESET + "Stay away from the borders!",
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Join " + ChatColor.GREEN + getPlugin().getGroupTagPlayerCount("HG") + ChatColor.RESET + " other players!",
|
||||
ChatColor.RESET + "Join " + ChatColor.GREEN + (getPlugin().getGroupTagPlayerCount("HG") + getPlugin().getGroupTagPlayerCount("SG2")) + ChatColor.RESET + " other players!",
|
||||
}));
|
||||
|
||||
setItem(4, ItemStackFactory.Instance.CreateStack(Material.FEATHER.getId(), (byte) 0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Skywars " + C.cGray + "Solo/Team Survival", new String[]
|
||||
@ -83,7 +83,7 @@ public class ServerGameMenu extends ShopPageBase<ServerManager, QuickShop>
|
||||
ChatColor.RESET + "Way up there, death ever looming if you fall..",
|
||||
ChatColor.RESET + "Can you fight? Can you live? Can you win Skywars?",
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Join " + ChatColor.GREEN + getPlugin().getGroupTagPlayerCount("SKY") + ChatColor.RESET + " other players!",
|
||||
ChatColor.RESET + "Join " + ChatColor.GREEN + (getPlugin().getGroupTagPlayerCount("SKY") + getPlugin().getGroupTagPlayerCount("SKY2")) + ChatColor.RESET + " other players!",
|
||||
}));
|
||||
|
||||
setItem(6, ItemStackFactory.Instance.CreateStack(Material.GOLDEN_APPLE.getId(), (byte)0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "UHC " + C.cGray + "Ultra Hardcore Mode", new String[]
|
||||
@ -453,7 +453,7 @@ public class ServerGameMenu extends ShopPageBase<ServerManager, QuickShop>
|
||||
ChatColor.RESET + "then battle other players to the ",
|
||||
ChatColor.RESET + "death with your monsters skills!",
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Join " + ChatColor.GREEN + getPlugin().getGroupTagPlayerCount("SSM") + ChatColor.RESET + " other players!",
|
||||
ChatColor.RESET + "Join " + ChatColor.GREEN + (getPlugin().getGroupTagPlayerCount("SSM") + getPlugin().getGroupTagPlayerCount("SSM2")) + ChatColor.RESET + " other players!",
|
||||
};
|
||||
|
||||
_superSmashCycle.add(ItemStackFactory.Instance.CreateStack(397, (byte)4, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Super Smash Mobs " + C.cGray + "Solo/Team Deathmatch", desc));
|
||||
|
@ -37,14 +37,14 @@ public class ServerNpcPage extends ShopPageBase<ServerManager, ServerNpcShop> im
|
||||
private static final String MESSAGE_FULL_GET_ULTRA = ChatColor.RESET + C.Line + "Get Ultra to join full servers!";
|
||||
private static final String MESSAGE_RESTARTING = ChatColor.RESET + C.Line + "This server will be open shortly!";
|
||||
|
||||
private String _serverNpcKey;
|
||||
private String _serverGroupName;
|
||||
private boolean _onMainPage = true;
|
||||
|
||||
public ServerNpcPage(ServerManager plugin, ServerNpcShop shop, CoreClientManager clientManager, DonationManager donationManager, String name, Player player, String serverNpcKey)
|
||||
public ServerNpcPage(ServerManager plugin, ServerNpcShop shop, CoreClientManager clientManager, DonationManager donationManager, String name, Player player, String serverGroupName)
|
||||
{
|
||||
super(plugin, shop, clientManager, donationManager, name, player, 54);
|
||||
|
||||
_serverNpcKey = serverNpcKey;
|
||||
_serverGroupName = serverGroupName;
|
||||
|
||||
buildPage();
|
||||
}
|
||||
@ -52,13 +52,16 @@ public class ServerNpcPage extends ShopPageBase<ServerManager, ServerNpcShop> im
|
||||
@Override
|
||||
protected void buildPage()
|
||||
{
|
||||
List<ServerInfo> serverList = new ArrayList<ServerInfo>(getPlugin().GetServerList(_serverNpcKey));
|
||||
System.out.println(_serverGroupName);
|
||||
System.out.println("getPlugin() null?" + (getPlugin() == null));
|
||||
List<ServerInfo> serverList = new ArrayList<ServerInfo>(getPlugin().getServerList(_serverGroupName));
|
||||
|
||||
int slotsNeeded = 1;
|
||||
|
||||
|
||||
if (serverList.size() > 0)
|
||||
{
|
||||
slotsNeeded = getPlugin().GetRequiredSlots(getPlayer(), serverList.get(0).ServerType);
|
||||
slotsNeeded = getPlugin().getRequiredSlots(getPlayer(), serverList.get(0).ServerType);
|
||||
}
|
||||
|
||||
try
|
||||
@ -73,6 +76,13 @@ public class ServerNpcPage extends ShopPageBase<ServerManager, ServerNpcShop> im
|
||||
|
||||
if (_onMainPage)
|
||||
{
|
||||
addButton(4, ItemStackFactory.Instance.CreateStack(Material.DIAMOND_BLOCK, (byte) 0, 1, C.cGreen + "Click to Join instantly!"), new IButton() {
|
||||
|
||||
@Override
|
||||
public void onClick(Player player, ClickType clickType) {
|
||||
getPlugin().selectServer(player, _serverGroupName);
|
||||
}
|
||||
});
|
||||
buildAvailableServerPage(serverList, slotsNeeded);
|
||||
}
|
||||
else
|
||||
@ -401,7 +411,7 @@ public class ServerNpcPage extends ShopPageBase<ServerManager, ServerNpcShop> im
|
||||
|
||||
public void SelectServer(Player player, ServerInfo serverInfo)
|
||||
{
|
||||
int slots = getPlugin().GetRequiredSlots(player, serverInfo.ServerType);
|
||||
int slots = getPlugin().getRequiredSlots(player, serverInfo.ServerType);
|
||||
|
||||
if (serverInfo.getAvailableSlots() < slots && !(getDonationManager().Get(getPlayer().getName()).OwnsUnknownPackage(serverInfo.ServerType + " ULTRA") || getClient().GetRank().Has(Rank.ULTRA)))
|
||||
{
|
||||
@ -409,6 +419,6 @@ public class ServerNpcPage extends ShopPageBase<ServerManager, ServerNpcShop> im
|
||||
return;
|
||||
}
|
||||
|
||||
getPlugin().SelectServer(player, serverInfo);
|
||||
getPlugin().selectServer(player, serverInfo);
|
||||
}
|
||||
}
|
||||
|
@ -27,13 +27,13 @@ public class ServerNpcShop extends ShopBase<ServerManager>
|
||||
@Override
|
||||
protected ShopPageBase<ServerManager, ? extends ShopBase<ServerManager>> buildPagesFor(Player player)
|
||||
{
|
||||
if (_serverGroup.getPrefix().equalsIgnoreCase("MPS") || _serverGroup.getPrefix().equalsIgnoreCase("EVENT"))
|
||||
if (_serverGroup.getPrefix().equalsIgnoreCase("SSM") || _serverGroup.getPrefix().equalsIgnoreCase("SKY") || _serverGroup.getPrefix().equalsIgnoreCase("HG"))
|
||||
{
|
||||
return new ServerNpcPage(getPlugin(), this, getClientManager(), getDonationManager(), _serverGroup.getServerNpcName(), player, _serverGroup.getPrefix());
|
||||
return new ServerTypePage(getPlugin(), this, getClientManager(), getDonationManager(), player, _serverGroup);
|
||||
}
|
||||
else
|
||||
{
|
||||
return new ServerTypePage(getPlugin(), this, getClientManager(), getDonationManager(), player, _serverGroup);
|
||||
return new ServerNpcPage(getPlugin(), this, getClientManager(), getDonationManager(), _serverGroup.getServerNpcName(), player, _serverGroup.getPrefix());
|
||||
}
|
||||
|
||||
}
|
||||
@ -79,7 +79,7 @@ public class ServerNpcShop extends ShopBase<ServerManager>
|
||||
getPlugin().getHubManager().GetVisibility().removeHiddenPlayer(player);
|
||||
}
|
||||
|
||||
@Override
|
||||
/*@Override
|
||||
public boolean attemptShopOpen(Player player)
|
||||
{
|
||||
if (_serverGroup.getTeamServerKey().isEmpty() && !_serverGroup.getPrefix().equalsIgnoreCase("EVENT") && !_serverGroup.getPrefix().equalsIgnoreCase("MPS")) // Has no team server key, so auto-join
|
||||
@ -89,5 +89,5 @@ public class ServerNpcShop extends ShopBase<ServerManager>
|
||||
}
|
||||
|
||||
return super.attemptShopOpen(player);
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
@ -80,11 +80,14 @@ public class ServerTypePage extends ShopPageBase<ServerManager, ServerNpcShop>
|
||||
{
|
||||
if (team)
|
||||
{
|
||||
getPlugin().selectServer(player, _serverGroup.getTeamServerKey()); // TODO: Grab the team-key instead of regular game key
|
||||
//getPlugin().selectServer(player, _serverGroup.getTeamServerKey()); // TODO: Grab the team-key instead of regular game key
|
||||
//getPlugin().getServerNPCShopByName(_serverGroup.getServerNpcName() + " 2").attemptShopOpen(player);
|
||||
getShop().openPageForPlayer(player, new ServerNpcPage(getPlugin(), getShop(), getClientManager(), getDonationManager(), _serverGroup.getServerNpcName(), player, _serverGroup.getTeamServerKey()));
|
||||
}
|
||||
else
|
||||
{
|
||||
getPlugin().selectServer(player, _serverGroup.getPrefix());
|
||||
//getPlugin().selectServer(player, _serverGroup.getPrefix());
|
||||
getShop().openPageForPlayer(player, new ServerNpcPage(getPlugin(), getShop(), getClientManager(), getDonationManager(), _serverGroup.getServerNpcName(), player, _serverGroup.getPrefix()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user