Remove connected check on setScoreboard
No other API uses such a check and it has been removed in Spigot since f7086eb96d9977d717af75c0dd2eb38349b2df2b in 2013.
This commit is contained in:
parent
f90ce621ef
commit
465ec3fb42
@ -1917,7 +1917,6 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
|||||||
public void setScoreboard(Scoreboard scoreboard) {
|
public void setScoreboard(Scoreboard scoreboard) {
|
||||||
Preconditions.checkArgument(scoreboard != null, "Scoreboard cannot be null");
|
Preconditions.checkArgument(scoreboard != null, "Scoreboard cannot be null");
|
||||||
Preconditions.checkState(getHandle().connection != null, "Cannot set scoreboard yet (invalid player connection)");
|
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);
|
this.server.getScoreboardManager().setPlayerBoard(this, scoreboard);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user