mirror of
https://github.com/HibiscusMC/HibiscusCommons.git
synced 2025-12-19 15:09:26 +00:00
fix: when server is in offline mode skin property can be null which is not possible in a info packet
This commit is contained in:
@@ -91,7 +91,7 @@ public class NMSPackets extends NMSCommon implements me.lojosho.hibiscuscommons.
|
||||
Property property = ((CraftPlayer) skinnedPlayer).getProfile().getProperties().get("textures").stream().findAny().orElse(null);
|
||||
|
||||
GameProfile profile = new GameProfile(uuid, name);
|
||||
profile.getProperties().put("textures", property);
|
||||
if (property != null) profile.getProperties().put("textures", property);
|
||||
|
||||
Component component = AdventureUtils.MINI_MESSAGE.deserialize(name);
|
||||
net.minecraft.network.chat.Component nmsComponent = HibiscusCommonsPlugin.isOnPaper() ? PaperAdventure.asVanilla(component) : net.minecraft.network.chat.Component.literal(name);
|
||||
|
||||
Reference in New Issue
Block a user