9
0
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:
Logan
2025-08-20 09:28:16 -05:00
parent e64c95faa5
commit 3ca01d3793
6 changed files with 6 additions and 6 deletions

View File

@@ -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);

View File

@@ -93,7 +93,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);

View File

@@ -94,7 +94,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);

View File

@@ -94,7 +94,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);

View File

@@ -94,7 +94,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);

View File

@@ -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);