From f7086eb96d9977d717af75c0dd2eb38349b2df2b Mon Sep 17 00:00:00 2001 From: md_5 Date: Mon, 23 Dec 2013 15:58:41 +1100 Subject: [PATCH] Disable connected check on setScoreboard. Mojang's semi async Netty implementation can lead to race conditions, and this exception being thrown when it really shouldn't. --- ...ble-Connected-Check-on-setScoreboard.patch | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 CraftBukkit-Patches/0085-Disable-Connected-Check-on-setScoreboard.patch diff --git a/CraftBukkit-Patches/0085-Disable-Connected-Check-on-setScoreboard.patch b/CraftBukkit-Patches/0085-Disable-Connected-Check-on-setScoreboard.patch new file mode 100644 index 0000000000..5a32fdfda6 --- /dev/null +++ b/CraftBukkit-Patches/0085-Disable-Connected-Check-on-setScoreboard.patch @@ -0,0 +1,22 @@ +From 05a7acf595798c58789556ac73a9f663993aef21 Mon Sep 17 00:00:00 2001 +From: md_5 +Date: Mon, 23 Dec 2013 15:57:57 +1100 +Subject: [PATCH] Disable Connected Check on setScoreboard + + +diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +index c9454b5..1f29821 100644 +--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java ++++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +@@ -1068,7 +1068,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { + throw new IllegalStateException("Cannot set scoreboard yet"); + } + if (playerConnection.isDisconnected()) { +- throw new IllegalStateException("Cannot set scoreboard for invalid CraftPlayer"); ++ // throw new IllegalStateException("Cannot set scoreboard for invalid CraftPlayer"); // Spigot - remove this as Mojang's semi asynchronous Netty implementation can lead to races + } + + this.server.getScoreboardManager().setPlayerBoard(this, scoreboard); +-- +1.8.3.2 +