All I actually needed was: nextServer = null;

This commit is contained in:
md_5 2013-02-10 21:40:06 +11:00
parent 25d2902240
commit 2b1d2cba04
2 changed files with 3 additions and 3 deletions

View File

@ -83,6 +83,7 @@ public class UserConnection extends GenericConnection implements ProxiedPlayer
public void connect(ServerInfo target, boolean force)
{
nextServer = null;
if ( server == null )
{
// First join

View File

@ -2,7 +2,6 @@ package net.md_5.bungee.command;
import java.util.Map;
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.CommandSender;
import net.md_5.bungee.api.config.ServerInfo;
@ -27,7 +26,7 @@ public class CommandServer extends Command
{
return;
}
UserConnection player = (UserConnection) sender;
ProxiedPlayer player = (ProxiedPlayer) sender;
Map<String, ServerInfo> servers = BungeeCord.getInstance().config.getServers();
if ( args.length == 0 )
{
@ -50,7 +49,7 @@ public class CommandServer extends Command
player.sendMessage( ChatColor.RED + "You are already on this server." );
} else
{
player.connect( server, true );
player.connect( server );
}
}
}