From 3d36db0106095291bafefd4425395d0f5543251a Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Sat, 23 Dec 2023 08:39:28 +1100 Subject: [PATCH] Remove connected check on setScoreboard No other API uses such a check and it has been removed in Spigot since f7086eb96d9977d717af75c0dd2eb38349b2df2b in 2013. By: md_5 --- .../src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java | 1 - 1 file changed, 1 deletion(-) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java index 51738022b8..8c3f4c05d9 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -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); }