diff --git a/src/de/steamwar/bungeecore/tablist/Tablist.java b/src/de/steamwar/bungeecore/tablist/Tablist.java index 1aca15a..7aff72d 100644 --- a/src/de/steamwar/bungeecore/tablist/Tablist.java +++ b/src/de/steamwar/bungeecore/tablist/Tablist.java @@ -66,7 +66,7 @@ public class Tablist extends MessageToMessageDecoder { } public void update(TablistPart global, int seconds) { - if (player.getServer() == null) + if (connection == null) return; player.unsafe().sendPacket(new PlayerListHeaderFooter( @@ -147,8 +147,8 @@ public class Tablist extends MessageToMessageDecoder { public void onServerSwitch() { connection = (ServerConnection) player.getServer(); synchronized (directTabItems) { - directTabItems.clear(); sendNpcPacket(npcs.stream().map(npc -> directTabItems.get(npc).getUsername()).collect(Collectors.toList()), true); + directTabItems.clear(); npcs.clear(); }