From a38b3ce9f289da9b64d6f1c6a89bf4a6e3af86af Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 14 Apr 2013 18:51:33 +1000 Subject: [PATCH] Try removing connections via string key and direct map access. Closes issue #267 --- .../main/java/net/md_5/bungee/connection/UpstreamBridge.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/proxy/src/main/java/net/md_5/bungee/connection/UpstreamBridge.java b/proxy/src/main/java/net/md_5/bungee/connection/UpstreamBridge.java index ab62c49d3..52bc60b8d 100644 --- a/proxy/src/main/java/net/md_5/bungee/connection/UpstreamBridge.java +++ b/proxy/src/main/java/net/md_5/bungee/connection/UpstreamBridge.java @@ -2,6 +2,7 @@ package net.md_5.bungee.connection; import io.netty.channel.Channel; import lombok.RequiredArgsConstructor; +import net.md_5.bungee.BungeeCord; import net.md_5.bungee.EntityMap; import net.md_5.bungee.UserConnection; import net.md_5.bungee.Util; @@ -35,7 +36,7 @@ public class UpstreamBridge extends PacketHandler PlayerDisconnectEvent event = new PlayerDisconnectEvent( con ); bungee.getPluginManager().callEvent( event ); bungee.getTabListHandler().onDisconnect( con ); - bungee.getPlayers().remove( con ); + BungeeCord.getInstance().connections.remove( con.getName() ); //TODO: Better way, why do we need to raw access? if ( con.getServer() != null ) {