9
0
mirror of https://github.com/HibiscusMC/HMCCosmetics.git synced 2025-12-19 15:09:19 +00:00

Fix for client disconnect as NPC name was >16 characters

Signed-off-by: LoJoSho <contact@lojosho.com>
This commit is contained in:
LoJoSho
2022-09-10 21:22:52 -05:00
parent 007e5487e6
commit 482aec27f1

View File

@@ -611,7 +611,7 @@ public class PacketManager {
) {
WrapperPlayServerPlayerInfo info = new WrapperPlayServerPlayerInfo();
info.setAction(EnumWrappers.PlayerInfoAction.ADD_PLAYER);
WrappedGameProfile wrappedGameProfile = new WrappedGameProfile(uuid, skinnedPlayer.getName() + "-NPC");
WrappedGameProfile wrappedGameProfile = new WrappedGameProfile(uuid, skinnedPlayer.getEntityId() + "-NPC");
wrappedGameProfile.getProperties().put("textures", getSkin(skinnedPlayer));
info.setData(List.of(new PlayerInfoData(wrappedGameProfile, 0, EnumWrappers.NativeGameMode.CREATIVE, WrappedChatComponent.fromText(skinnedPlayer.getName() + "-NPC"))));
for (final Player p : sendTo) {