From 2b1d2cba0400fcd0dc6794c1e6e4f9a463d4a145 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 10 Feb 2013 21:40:06 +1100 Subject: [PATCH] All I actually needed was: nextServer = null; --- proxy/src/main/java/net/md_5/bungee/UserConnection.java | 1 + .../src/main/java/net/md_5/bungee/command/CommandServer.java | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/proxy/src/main/java/net/md_5/bungee/UserConnection.java b/proxy/src/main/java/net/md_5/bungee/UserConnection.java index 2d449a0d..bbe14b6e 100644 --- a/proxy/src/main/java/net/md_5/bungee/UserConnection.java +++ b/proxy/src/main/java/net/md_5/bungee/UserConnection.java @@ -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 diff --git a/proxy/src/main/java/net/md_5/bungee/command/CommandServer.java b/proxy/src/main/java/net/md_5/bungee/command/CommandServer.java index ab34dcf9..64cdb977 100644 --- a/proxy/src/main/java/net/md_5/bungee/command/CommandServer.java +++ b/proxy/src/main/java/net/md_5/bungee/command/CommandServer.java @@ -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 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 ); } } }