Essential-Commands
e1a0ef53 - fix: handlePlayerDataRespawnSync seemingly executes too late in the respawn process

Commit
2 years ago
fix: handlePlayerDataRespawnSync seemingly executes too late in the respawn process This is the second fix around this. The first has a commit name: "fix: `PlayerData` lost on respawn if EC spawn not set" ServerPlayerEntity.copyFrom was triggering a getDisplayName (it looked like???) so, I've moved the handlePlayerDataRespawnSync to right after the `new ServerPlayerEntity` ctor invoke, so that we can't miss it. Note that the old mixin inject remains because `handleRespawnAtEcSpawn` has to happen after the new ServerPlayerEntity's spawn gets set in the `respawnPlayer` method. (this remains the location for `PlayerRespawnCallback`'s invoke because more of the new ServerPlayerEntity is constructed/populated at this stage.
Author
Committer
Parents
Loading