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

23 Zeilen
1.1 KiB
Diff

2015-02-28 12:36:22 +01:00
From dcf83e0337de967e36ed1e2a028c4a976d26c1f6 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-02-28 12:36:22 +01:00
index 276c9fd..cbbcfc9 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1241,7 +1241,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);
--
2014-11-28 02:17:45 +01:00
2.1.0