All I actually needed was: nextServer = null;
This commit is contained in:
parent
25d2902240
commit
2b1d2cba04
@ -83,6 +83,7 @@ public class UserConnection extends GenericConnection implements ProxiedPlayer
|
|||||||
|
|
||||||
public void connect(ServerInfo target, boolean force)
|
public void connect(ServerInfo target, boolean force)
|
||||||
{
|
{
|
||||||
|
nextServer = null;
|
||||||
if ( server == null )
|
if ( server == null )
|
||||||
{
|
{
|
||||||
// First join
|
// First join
|
||||||
|
@ -2,7 +2,6 @@ package net.md_5.bungee.command;
|
|||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import net.md_5.bungee.BungeeCord;
|
import net.md_5.bungee.BungeeCord;
|
||||||
import net.md_5.bungee.UserConnection;
|
|
||||||
import net.md_5.bungee.api.ChatColor;
|
import net.md_5.bungee.api.ChatColor;
|
||||||
import net.md_5.bungee.api.CommandSender;
|
import net.md_5.bungee.api.CommandSender;
|
||||||
import net.md_5.bungee.api.config.ServerInfo;
|
import net.md_5.bungee.api.config.ServerInfo;
|
||||||
@ -27,7 +26,7 @@ public class CommandServer extends Command
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
UserConnection player = (UserConnection) sender;
|
ProxiedPlayer player = (ProxiedPlayer) sender;
|
||||||
Map<String, ServerInfo> servers = BungeeCord.getInstance().config.getServers();
|
Map<String, ServerInfo> servers = BungeeCord.getInstance().config.getServers();
|
||||||
if ( args.length == 0 )
|
if ( args.length == 0 )
|
||||||
{
|
{
|
||||||
@ -50,7 +49,7 @@ public class CommandServer extends Command
|
|||||||
player.sendMessage( ChatColor.RED + "You are already on this server." );
|
player.sendMessage( ChatColor.RED + "You are already on this server." );
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
player.connect( server, true );
|
player.connect( server );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user