From 3e6ed015ad474fa7b728accfec8d8a39a4cbe551 Mon Sep 17 00:00:00 2001 From: Boy Date: Sat, 8 Jun 2024 10:00:44 +0200 Subject: [PATCH] feat: handle tablist playernames --- .../com/mineinabyss/emojy/nms/v1_20_R4/EmojyNMSHandler.kt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/v1_20_R4/src/main/kotlin/com/mineinabyss/emojy/nms/v1_20_R4/EmojyNMSHandler.kt b/v1_20_R4/src/main/kotlin/com/mineinabyss/emojy/nms/v1_20_R4/EmojyNMSHandler.kt index c4e9ee0..b6bb139 100644 --- a/v1_20_R4/src/main/kotlin/com/mineinabyss/emojy/nms/v1_20_R4/EmojyNMSHandler.kt +++ b/v1_20_R4/src/main/kotlin/com/mineinabyss/emojy/nms/v1_20_R4/EmojyNMSHandler.kt @@ -114,6 +114,13 @@ class EmojyNMSHandler(emojy: EmojyPlugin) : IEmojyNMSHandler { packet } + is ClientboundPlayerInfoUpdatePacket -> { + ClientboundPlayerInfoUpdatePacket(packet.actions(), packet.newEntries().map { + ClientboundPlayerInfoUpdatePacket.Entry(it.profileId, it.profile, it.listed, it.latency, + it.gameMode, it.displayName?.transformEmotes(connection.locale()), it.chatSession + ) + }).takeIf { packet.newEntries().isNotEmpty() } ?: packet + } else -> packet }, promise )