Paper/CraftBukkit-Patches/0065-Disable-Connected-Check-on-setScoreboard.patch

23 lines
1.1 KiB
Diff
Raw Normal View History

2015-06-09 01:16:01 +02:00
From d794f5fb8f68abdd0eb37a7a48501cce85bc0e6f Mon Sep 17 00:00:00 2001
From: md_5 <git@md-5.net>
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
2015-06-09 01:16:01 +02:00
index 295565e..1a38905 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
2015-06-09 01:16:01 +02:00
@@ -1242,7 +1242,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);
--
2015-05-09 22:23:26 +02:00
2.1.4