From cd80bc746e98ff7ed341cf6b1ae61ee73e11cacf Mon Sep 17 00:00:00 2001 From: LoJoSho Date: Thu, 15 Jun 2023 13:13:16 -0500 Subject: [PATCH] fix: wrong index for 1.18.2 player info packet --- .../hibiscusmc/hmccosmetics/util/packets/PacketManager.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/src/main/java/com/hibiscusmc/hmccosmetics/util/packets/PacketManager.java b/common/src/main/java/com/hibiscusmc/hmccosmetics/util/packets/PacketManager.java index 1ba48e5e..d57bef14 100644 --- a/common/src/main/java/com/hibiscusmc/hmccosmetics/util/packets/PacketManager.java +++ b/common/src/main/java/com/hibiscusmc/hmccosmetics/util/packets/PacketManager.java @@ -306,8 +306,8 @@ public class PacketManager extends BasePacket { WrappedGameProfile wrappedGameProfile = new WrappedGameProfile(uuid, name); WrappedSignedProperty skinData = PlayerUtils.getSkin(skinnedPlayer); if (skinData != null) wrappedGameProfile.getProperties().put("textures", skinData); - // For sor some reason 1.19.2 handles it on the 0 field index, every other verison handles it on the 1 - if (NMSHandlers.getVersion().contains("v1_19_R1")) { + // For sor some reason <1.19.2 handles it on the 0 field index, newer versions handles it on the 1 + if (NMSHandlers.getVersion().contains("v1_17_R1") || NMSHandlers.getVersion().contains("v1_18_R2") || NMSHandlers.getVersion().contains("v1_19_R1")) { info.getHandle().getPlayerInfoDataLists().write(0, Collections.singletonList(new PlayerInfoData( wrappedGameProfile, 0,