mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-23 11:06:29 +01:00
57dd397155
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: b999860d SPIGOT-2304: Add LootGenerateEvent CraftBukkit Changes:77fd87e4
SPIGOT-2304: Implement LootGenerateEventa1a705ee
SPIGOT-5566: Doused campfires & fires should call EntityChangeBlockEvent41712edd
SPIGOT-5707: PersistentDataHolder not Persistent on API dropped Item
29 lines
1.4 KiB
Diff
29 lines
1.4 KiB
Diff
From ea40fdf45bb3c6b1130177862a7496efaae08a24 Mon Sep 17 00:00:00 2001
|
|
From: Aikar <aikar@aikar.co>
|
|
Date: Sat, 11 Apr 2020 21:38:59 -0400
|
|
Subject: [PATCH] Disable Sync Events firing Async errors during shutdown
|
|
|
|
This is how it use to behave on Paper, and this is totally destroying
|
|
the ability to try to shut the server down gracefully during the
|
|
shutdown process as events firing on the watchdog thread are throwing
|
|
errors.
|
|
|
|
This isn't an issue on Spigot
|
|
|
|
diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
|
index 8355f9f0e..4931bc86d 100644
|
|
--- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
|
+++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
|
@@ -591,7 +591,7 @@ public final class SimplePluginManager implements PluginManager {
|
|
// 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()) {
|
|
+ } else if (!event.isAsynchronous() && !server.isPrimaryThread() && !server.isStopping() ) {
|
|
throw new IllegalStateException(event.getEventName() + " may only be triggered synchronously.");
|
|
}
|
|
|
|
--
|
|
2.26.2
|
|
|