Don't allow users to connect to the server they are already on.

This commit is contained in:
md_5 2013-01-08 12:11:56 +11:00
parent 0984b8703f
commit a3dbdae3df

View File

@ -36,6 +36,9 @@ public class CommandServer extends Command
if (!servers.contains(server)) if (!servers.contains(server))
{ {
con.sendMessage(ChatColor.RED + "The specified server does not exist"); con.sendMessage(ChatColor.RED + "The specified server does not exist");
} else if (args[0].equals(con.getServer()))
{
con.sendMessage(ChatColor.RED + "You are already on this server.");
} else } else
{ {
con.connect(server); con.connect(server);