Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Ursprung
593fe7389b
Commit
c2338fe3d0
@ -148,8 +148,8 @@ public class Tablist extends MessageToMessageDecoder<PacketWrapper> {
|
||||
synchronized (directTabItems) {
|
||||
directTabItems.clear();
|
||||
sendNpcPacket(npcs.stream().map(npc -> directTabItems.get(npc).getUsername()).collect(Collectors.toList()), true);
|
||||
npcs.clear();
|
||||
}
|
||||
npcs.clear();
|
||||
|
||||
if(connection != null) {
|
||||
connection.getCh().getHandle().pipeline().addBefore(PipelineUtils.BOSS_HANDLER, "steamwar-tablist", this);
|
||||
@ -162,8 +162,8 @@ public class Tablist extends MessageToMessageDecoder<PacketWrapper> {
|
||||
current.clear();
|
||||
synchronized (directTabItems) {
|
||||
sendNpcPacket(npcs.stream().map(npc -> directTabItems.get(npc).getUsername()).collect(Collectors.toList()), true);
|
||||
npcs.clear();
|
||||
}
|
||||
npcs.clear();
|
||||
|
||||
if(connection != null)
|
||||
connection.getCh().getHandle().pipeline().remove(this);
|
||||
@ -209,12 +209,15 @@ public class Tablist extends MessageToMessageDecoder<PacketWrapper> {
|
||||
}
|
||||
break;
|
||||
case REMOVE_PLAYER:
|
||||
List<String> names = new ArrayList<>();
|
||||
for(PlayerListItem.Item item : list.getItems()) {
|
||||
synchronized (directTabItems) {
|
||||
directTabItems.remove(item.getUuid());
|
||||
PlayerListItem.Item directItem = directTabItems.remove(item.getUuid());
|
||||
if(npcs.remove(item.getUuid()))
|
||||
names.add(directItem.getUsername());
|
||||
}
|
||||
npcs.remove(item.getUuid());
|
||||
}
|
||||
sendNpcPacket(names, true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren