From a41d51f098820e61c2d3a4337cca5e8d23cfe33c 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 --- .../0017-Add-exception-reporting-event.patch | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Spigot-API-Patches/0017-Add-exception-reporting-event.patch b/Spigot-API-Patches/0017-Add-exception-reporting-event.patch index 624486a9e4..eac4ce8aec 100644 --- a/Spigot-API-Patches/0017-Add-exception-reporting-event.patch +++ b/Spigot-API-Patches/0017-Add-exception-reporting-event.patch @@ -1,4 +1,4 @@ -From 40c4b5f00a9beeed4c2533dccb9e786bce2862f7 Mon Sep 17 00:00:00 2001 +From 21c928ac4a621dd3024e55743da904c9f3423e37 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Mon, 29 Feb 2016 20:24:35 -0600 Subject: [PATCH] Add exception reporting event @@ -6,14 +6,15 @@ 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 +1,41 @@ +@@ -0,0 +1,43 @@ +package com.destroystokyo.paper.event.server; + +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"); + } +