Paper/Spigot-API-Patches/0018-Fix-ServerListPingEvent-flagging-as-Async.patch
Spottedleaf 19de9af63c 1.15.2 update (#2887)
Functional GUI fix added by billygalbreath
2020-01-21 20:02:07 -06:00

31 lines
928 B
Diff

From 709bd509e61a7f25b64fe128b2ae42a5bef797d0 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 29 Feb 2016 20:26:39 -0600
Subject: [PATCH] Fix ServerListPingEvent flagging as Async
This event can sometimes fire Async, set the proper boolean
diff --git a/src/main/java/org/bukkit/event/server/ServerEvent.java b/src/main/java/org/bukkit/event/server/ServerEvent.java
index 46b11901..05167fb3 100644
--- a/src/main/java/org/bukkit/event/server/ServerEvent.java
+++ b/src/main/java/org/bukkit/event/server/ServerEvent.java
@@ -1,5 +1,6 @@
package org.bukkit.event.server;
+import org.bukkit.Bukkit;
import org.bukkit.event.Event;
/**
@@ -8,7 +9,7 @@ import org.bukkit.event.Event;
public abstract class ServerEvent extends Event {
public ServerEvent() {
- super();
+ super(!Bukkit.isPrimaryThread()); // Paper
}
public ServerEvent(boolean isAsync) {
--
2.25.0.windows.1