mirror of
https://github.com/SpigotMC/BungeeCord.git
synced 2024-11-28 05:05:21 +01:00
This commit is contained in:
parent
27d454524f
commit
6813b82b84
@ -97,9 +97,15 @@ public final class UserConnection implements ProxiedPlayer
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void connect(ServerInfo target)
|
public void connect(ServerInfo target)
|
||||||
|
{
|
||||||
|
if ( getServer() != null && getServer().getInfo() == target )
|
||||||
|
{
|
||||||
|
sendMessage( ChatColor.RED + "Cannot connect to server you are already on!" );
|
||||||
|
} else
|
||||||
{
|
{
|
||||||
connect( target, false );
|
connect( target, false );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void connectNow(ServerInfo target)
|
public void connectNow(ServerInfo target)
|
||||||
{
|
{
|
||||||
|
@ -50,9 +50,6 @@ public class CommandServer extends Command
|
|||||||
if ( server == null )
|
if ( server == null )
|
||||||
{
|
{
|
||||||
player.sendMessage( ChatColor.RED + "The specified server does not exist" );
|
player.sendMessage( ChatColor.RED + "The specified server does not exist" );
|
||||||
} else if ( server.equals( player.getServer().getInfo() ) )
|
|
||||||
{
|
|
||||||
player.sendMessage( ChatColor.RED + "You are already on this server." );
|
|
||||||
} else if ( !server.canAccess( player ) )
|
} else if ( !server.canAccess( player ) )
|
||||||
{
|
{
|
||||||
player.sendMessage( ChatColor.RED + "You don't have permission to access this server" );
|
player.sendMessage( ChatColor.RED + "You don't have permission to access this server" );
|
||||||
|
Loading…
Reference in New Issue
Block a user