SteamWar/BungeeCore
Archiviert
13
2

Fix npcs #4
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Lixfel 2022-06-18 19:04:09 +02:00
Ursprung cc6860b0a5
Commit c30542970e

Datei anzeigen

@ -66,7 +66,7 @@ public class Tablist extends MessageToMessageDecoder<PacketWrapper> {
} }
public void update(TablistPart global, int seconds) { public void update(TablistPart global, int seconds) {
if (player.getServer() == null) if (connection == null)
return; return;
player.unsafe().sendPacket(new PlayerListHeaderFooter( player.unsafe().sendPacket(new PlayerListHeaderFooter(
@ -147,8 +147,8 @@ public class Tablist extends MessageToMessageDecoder<PacketWrapper> {
public void onServerSwitch() { public void onServerSwitch() {
connection = (ServerConnection) player.getServer(); connection = (ServerConnection) player.getServer();
synchronized (directTabItems) { synchronized (directTabItems) {
directTabItems.clear();
sendNpcPacket(npcs.stream().map(npc -> directTabItems.get(npc).getUsername()).collect(Collectors.toList()), true); sendNpcPacket(npcs.stream().map(npc -> directTabItems.get(npc).getUsername()).collect(Collectors.toList()), true);
directTabItems.clear();
npcs.clear(); npcs.clear();
} }