fix(appearance): fix player destroy/create
This commit is contained in:
parent
b7ac5862eb
commit
c20df8bc48
1 changed files with 7 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue