Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: d0800d0c Update checkstyle e4e4bf70 Remove package-info from tests, breaks some IDEs d6651bb0 No longer necessary to synchronize sync events CraftBukkit Changes: e82b5477 SPIGOT-5556: Some biome methods use incorrect positions 544ccdc5 Update checkstyle 512ff7a5 Print legacy load reason in debug mode df371c1b SPIGOT-5554: Clear error message when BossBar is used for not fully joined players 18168500 Update scriptus 6bbb4e73 Clean up CraftBlockData.toString b1e96bd5 SPIGOT-5551: BlockState.setData fails when used by legacy plugin Spigot Changes: b9baf717 Add space before ocean seed output 13394884 Rebuild patches
This commit is contained in:
@@ -16,7 +16,7 @@ which results in a hard crash.
|
||||
This change removes the synchronize and adds some protection around enable/disable
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
|
||||
index a8dbf282..b4069dbf 100644
|
||||
index a8dbf282d..b4069dbf3 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Entity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Entity.java
|
||||
@@ -0,0 +0,0 @@ import org.jetbrains.annotations.Nullable;
|
||||
@@ -29,7 +29,7 @@ index a8dbf282..b4069dbf 100644
|
||||
*
|
||||
* @return a new copy of Location containing the position of this entity
|
||||
diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
index 7453230c..634e51d5 100644
|
||||
index 93a8cc13b..8d54d5619 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
@@ -0,0 +0,0 @@ public final class SimplePluginManager implements PluginManager {
|
||||
@@ -78,28 +78,26 @@ index 7453230c..634e51d5 100644
|
||||
- if (server.isPrimaryThread()) {
|
||||
- throw new IllegalStateException(event.getEventName() + " cannot be triggered asynchronously from primary server thread.");
|
||||
- }
|
||||
- fireEvent(event);
|
||||
- } else {
|
||||
- if (!server.isPrimaryThread()) {
|
||||
- throw new IllegalStateException(event.getEventName() + " cannot be triggered asynchronously from another thread.");
|
||||
- }
|
||||
- synchronized (this) {
|
||||
- fireEvent(event);
|
||||
- }
|
||||
+ // Paper - replace callEvent by merging to below method
|
||||
+ if (event.isAsynchronous() && server.isPrimaryThread()) {
|
||||
+ throw new IllegalStateException(event.getEventName() + " may only be triggered asynchronously.");
|
||||
+ } else if (!event.isAsynchronous() && !server.isPrimaryThread()) {
|
||||
+ throw new IllegalStateException(event.getEventName() + " may only be triggered synchronously.");
|
||||
}
|
||||
- }
|
||||
|
||||
- fireEvent(event);
|
||||
- }
|
||||
-
|
||||
- private void fireEvent(@NotNull Event event) {
|
||||
HandlerList handlers = event.getHandlers();
|
||||
RegisteredListener[] listeners = handlers.getRegisteredListeners();
|
||||
|
||||
diff --git a/src/test/java/org/bukkit/plugin/PluginManagerTest.java b/src/test/java/org/bukkit/plugin/PluginManagerTest.java
|
||||
index f188cd4f..1941c9f4 100644
|
||||
index f188cd4f3..1941c9f49 100644
|
||||
--- a/src/test/java/org/bukkit/plugin/PluginManagerTest.java
|
||||
+++ b/src/test/java/org/bukkit/plugin/PluginManagerTest.java
|
||||
@@ -0,0 +0,0 @@ public class PluginManagerTest {
|
||||
|
||||
Reference in New Issue
Block a user