Don't allow users to connect to the server they are already on.
This commit is contained in:
parent
0984b8703f
commit
a3dbdae3df
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user