From e1fb590ee6868d0d08826ac8c64ccff7fcb8d571 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Thu, 18 Jul 2019 08:58:23 +0100 Subject: [PATCH] ServerExceptionEvent can be fired off main --- Spigot-API-Patches/Add-exception-reporting-event.patch | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Spigot-API-Patches/Add-exception-reporting-event.patch b/Spigot-API-Patches/Add-exception-reporting-event.patch index 037edd3f07..fb1c97e62d 100644 --- a/Spigot-API-Patches/Add-exception-reporting-event.patch +++ b/Spigot-API-Patches/Add-exception-reporting-event.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Add exception reporting event diff --git a/src/main/java/com/destroystokyo/paper/event/server/ServerExceptionEvent.java b/src/main/java/com/destroystokyo/paper/event/server/ServerExceptionEvent.java new file mode 100644 -index 00000000..d3b00f74 +index 00000000..2f573299 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/event/server/ServerExceptionEvent.java @@ -0,0 +0,0 @@ @@ -14,6 +14,7 @@ index 00000000..d3b00f74 + +import com.google.common.base.Preconditions; +import org.apache.commons.lang.Validate; ++import org.bukkit.Bukkit; +import org.bukkit.event.Event; +import org.bukkit.event.HandlerList; +import com.destroystokyo.paper.exception.ServerException; @@ -27,6 +28,7 @@ index 00000000..d3b00f74 + @NotNull private ServerException exception; + + public ServerExceptionEvent(@NotNull ServerException exception) { ++ super(!Bukkit.isPrimaryThread()); + this.exception = Preconditions.checkNotNull(exception, "exception"); + } +