fix(appearance): fix player destroy/create

This commit is contained in:
ineanto 2025-06-30 22:01:49 +02:00
parent b7ac5862eb
commit c20df8bc48
Signed by: ineanto
GPG key ID: E511F9CAA2F9CE84

View file

@ -54,17 +54,24 @@ public class AppearanceManager {
if (skinChange) {
final ActionResult propertiesUpdateResult = packetSender.updatePlayerProfileProperties();
System.out.println(player.getPlayerProfile().getName());
if (propertiesUpdateResult.isError()) {
return resetWithoutUpdate();
}
}
// Not needed, but still broken using PE.
//packetSender.sendPlayerRespawn();
// Call the event.
final PlayerDisguiseEvent event = new PlayerDisguiseEvent(player, profile.getSkin(), profile.getName());
Bukkit.getPluginManager().callEvent(event);
packetSender.sendEntityMetadataUpdate();
packetSender.sendTabListUpdate(displayName);
packetSender.sendEntityRespawn();
return result;
}