Skip to content

Commit

Permalink
Update removal logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Thodor12 committed Nov 4, 2024
1 parent d6906d3 commit 9dd5155
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -384,8 +384,11 @@ private boolean isInTeam(@NotNull final PlayerTeam team)
public void remove(@NotNull final RemovalReason reason)
{
super.remove(reason);
// TODO: This causes a stackoverflow, how do we properly clean up team assignments?
//removeFromTeam();
final PlayerTeam playersTeam = level.getScoreboard().getPlayersTeam(getScoreboardName());
if (playersTeam != null)
{
level.getScoreboard().removePlayerFromTeam(getScoreboardName(), playersTeam);
}
}

/**
Expand Down

0 comments on commit 9dd5155

Please sign in to comment.