From 46dda8a1e662d778ff1c5d9a976a8da1b79248bb Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Thu, 15 Jun 2023 21:36:05 -0400 Subject: [PATCH] Fix Player#setScoreboard() checking incorrect state By: Parker Hawke --- .../main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java | 2 +- 1 file changed, 1 insertion(+), 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 6c5c176c15..9bace5f289 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 @@ -1820,7 +1820,7 @@ 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)"); + Preconditions.checkState(!getHandle().connection.isDisconnected(), "Cannot set scoreboard for invalid CraftPlayer (player is disconnected)"); this.server.getScoreboardManager().setPlayerBoard(this, scoreboard); }