Skip to content

Commit

Permalink
Replace player reference to scoreboard on respawn
Browse files Browse the repository at this point in the history
  • Loading branch information
aromaa committed Jan 12, 2023
1 parent d2cbe02 commit 9c89669
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -722,6 +722,9 @@ public void die(final DamageSource cause) {

// Update boss bars
SpongeAdventure.forEachBossBar(bar -> ((BossEventBridge) bar).bridge$replacePlayer(oldPlayer, (net.minecraft.server.level.ServerPlayer) (Object) this));

((ServerPlayerBridge) oldPlayer).bridge$removeScoreboardOnRespawn();
((ServerPlayerBridge) this).bridge$setScoreboardOnRespawn(((ServerPlayer) oldPlayer).scoreboard());
}

@SuppressWarnings({"ConstantConditions", "UnstableApiUsage"})
Expand Down

0 comments on commit 9c89669

Please sign in to comment.