Remove connected check on setScoreboard

No other API uses such a check and it has been removed in Spigot since f7086eb96d in 2013.

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot 2023-12-23 08:39:28 +11:00
parent fe17e5f886
commit 3d36db0106

View file

@ -1917,7 +1917,6 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
public void setScoreboard(Scoreboard scoreboard) {
Preconditions.checkArgument(scoreboard != null, "Scoreboard cannot be null");
Preconditions.checkState(getHandle().connection != null, "Cannot set scoreboard yet (invalid player connection)");
Preconditions.checkState(!getHandle().connection.isDisconnected(), "Cannot set scoreboard for invalid CraftPlayer (player is disconnected)");
this.server.getScoreboardManager().setPlayerBoard(this, scoreboard);
}