Archiviert
1
0

Test fix tablist order

Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Lixfel 2022-12-10 12:30:10 +01:00
Ursprung 3be4da2392
Commit 0c509bdfdc

Datei anzeigen

@ -168,8 +168,7 @@ public class Tablist extends MessageToMessageDecoder<PacketWrapper> {
pipeline.remove("steamwar-tablist"); pipeline.remove("steamwar-tablist");
pipeline.addBefore(PipelineUtils.BOSS_HANDLER, "steamwar-tablist", this); pipeline.addBefore(PipelineUtils.BOSS_HANDLER, "steamwar-tablist", this);
if(oldTab()) player.unsafe().sendPacket(teamPacket);
player.unsafe().sendPacket(teamPacket);
} }
} }
@ -324,7 +323,7 @@ public class Tablist extends MessageToMessageDecoder<PacketWrapper> {
} }
private void sendNpcPacket(List<String> names, boolean remove) { private void sendNpcPacket(List<String> names, boolean remove) {
if(oldTab() && !names.isEmpty()) { if(!names.isEmpty()) {
Team packet = new Team(TAB_TEAM); Team packet = new Team(TAB_TEAM);
packet.setMode((byte) (remove ? 4 : 3)); packet.setMode((byte) (remove ? 4 : 3));
packet.setPlayers(names.toArray(new String[0])); packet.setPlayers(names.toArray(new String[0]));