papermc/Spigot-API-Patches/0018-Fix-ServerListPingEvent-flagging-as-Async.patch

31 lines
918 B
Diff
Raw Normal View History

2019-04-23 04:47:07 +00:00
From f53ab7eff0bd8214cc0185fb8bb9f19f895aa6c9 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
2016-02-29 23:09:49 +00:00
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
2019-04-23 04:47:07 +00:00
index 46b11901..05167fb3 100644
--- a/src/main/java/org/bukkit/event/server/ServerEvent.java
+++ b/src/main/java/org/bukkit/event/server/ServerEvent.java
2019-04-23 04:47:07 +00:00
@@ -1,5 +1,6 @@
package org.bukkit.event.server;
+import org.bukkit.Bukkit;
import org.bukkit.event.Event;
/**
2019-04-23 04:47:07 +00:00
@@ -8,7 +9,7 @@ import org.bukkit.event.Event;
public abstract class ServerEvent extends Event {
2019-04-23 04:47:07 +00:00
public ServerEvent() {
- super();
+ super(!Bukkit.isPrimaryThread()); // Paper
}
public ServerEvent(boolean isAsync) {
--
2.21.0