geforkt von Mirrors/Paper
ServerExceptionEvent can be fired off main
Dieser Commit ist enthalten in:
Ursprung
22e3d2d3a7
Commit
e1fb590ee6
@ -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
|
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
|
new file mode 100644
|
||||||
index 00000000..d3b00f74
|
index 00000000..2f573299
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/event/server/ServerExceptionEvent.java
|
+++ b/src/main/java/com/destroystokyo/paper/event/server/ServerExceptionEvent.java
|
||||||
@@ -0,0 +0,0 @@
|
@@ -0,0 +0,0 @@
|
||||||
@ -14,6 +14,7 @@ index 00000000..d3b00f74
|
|||||||
+
|
+
|
||||||
+import com.google.common.base.Preconditions;
|
+import com.google.common.base.Preconditions;
|
||||||
+import org.apache.commons.lang.Validate;
|
+import org.apache.commons.lang.Validate;
|
||||||
|
+import org.bukkit.Bukkit;
|
||||||
+import org.bukkit.event.Event;
|
+import org.bukkit.event.Event;
|
||||||
+import org.bukkit.event.HandlerList;
|
+import org.bukkit.event.HandlerList;
|
||||||
+import com.destroystokyo.paper.exception.ServerException;
|
+import com.destroystokyo.paper.exception.ServerException;
|
||||||
@ -27,6 +28,7 @@ index 00000000..d3b00f74
|
|||||||
+ @NotNull private ServerException exception;
|
+ @NotNull private ServerException exception;
|
||||||
+
|
+
|
||||||
+ public ServerExceptionEvent(@NotNull ServerException exception) {
|
+ public ServerExceptionEvent(@NotNull ServerException exception) {
|
||||||
|
+ super(!Bukkit.isPrimaryThread());
|
||||||
+ this.exception = Preconditions.checkNotNull(exception, "exception");
|
+ this.exception = Preconditions.checkNotNull(exception, "exception");
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren