mirror of
https://github.com/HibiscusMC/HMCCosmetics.git
synced 2025-12-21 16:09:27 +00:00
Fix for client disconnect as NPC name was >16 characters
Signed-off-by: LoJoSho <contact@lojosho.com>
This commit is contained in:
@@ -611,7 +611,7 @@ public class PacketManager {
|
|||||||
) {
|
) {
|
||||||
WrapperPlayServerPlayerInfo info = new WrapperPlayServerPlayerInfo();
|
WrapperPlayServerPlayerInfo info = new WrapperPlayServerPlayerInfo();
|
||||||
info.setAction(EnumWrappers.PlayerInfoAction.ADD_PLAYER);
|
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));
|
wrappedGameProfile.getProperties().put("textures", getSkin(skinnedPlayer));
|
||||||
info.setData(List.of(new PlayerInfoData(wrappedGameProfile, 0, EnumWrappers.NativeGameMode.CREATIVE, WrappedChatComponent.fromText(skinnedPlayer.getName() + "-NPC"))));
|
info.setData(List.of(new PlayerInfoData(wrappedGameProfile, 0, EnumWrappers.NativeGameMode.CREATIVE, WrappedChatComponent.fromText(skinnedPlayer.getName() + "-NPC"))));
|
||||||
for (final Player p : sendTo) {
|
for (final Player p : sendTo) {
|
||||||
|
|||||||
Reference in New Issue
Block a user