mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-29 15:49:00 +01:00
ServerExceptionEvent can be fired off main
This commit is contained in:
parent
22e3d2d3a7
commit
e1fb590ee6
1 changed files with 3 additions and 1 deletions
|
@ -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");
|
||||
+ }
|
||||
+
|
||||
|
|
Loading…
Reference in a new issue