From 769e2e2148ddbc04450f9de41bfdcba217664a34 Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 25 Jan 2013 13:34:02 +1100 Subject: [PATCH] And users before.... --- .../main/java/net/md_5/bungee/tablist/GlobalTabList.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/proxy/src/main/java/net/md_5/bungee/tablist/GlobalTabList.java b/proxy/src/main/java/net/md_5/bungee/tablist/GlobalTabList.java index 29865176..b622e27c 100644 --- a/proxy/src/main/java/net/md_5/bungee/tablist/GlobalTabList.java +++ b/proxy/src/main/java/net/md_5/bungee/tablist/GlobalTabList.java @@ -5,6 +5,7 @@ import java.util.Set; import lombok.Synchronized; import net.md_5.bungee.BungeeCord; import net.md_5.bungee.UserConnection; +import net.md_5.bungee.api.ProxyServer; import net.md_5.bungee.api.TabListHandler; import net.md_5.bungee.api.connection.ProxiedPlayer; import net.md_5.bungee.packet.PacketC9PlayerListItem; @@ -17,9 +18,10 @@ public class GlobalTabList implements TabListHandler @Override public void onConnect(ProxiedPlayer player) { - for (UserConnection c : BungeeCord.getInstance().connections.values()) + UserConnection con = (UserConnection) player; + for (ProxiedPlayer p : ProxyServer.getInstance().getPlayers()) { - c.packetQueue.add(new PacketC9PlayerListItem(c.displayName, true, c.getPing())); + con.packetQueue.add(new PacketC9PlayerListItem(p.getDisplayName(), true, p.getPing())); } BungeeCord.getInstance().broadcast(new PacketC9PlayerListItem(player.getDisplayName(), true, player.getPing())); }