Initial work on 1.14 pre-5

This commit is contained in:
Shane Freeder
2019-04-23 05:47:07 +01:00
parent 85e05732b2
commit a84170f6a0
261 changed files with 912 additions and 1013 deletions

View File

@@ -6,7 +6,7 @@ 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 eb00d6af..70416c81 100644
index 46b11901..05167fb3 100644
--- a/src/main/java/org/bukkit/event/server/ServerEvent.java
+++ b/src/main/java/org/bukkit/event/server/ServerEvent.java
@@ -0,0 +0,0 @@
@@ -16,37 +16,13 @@ index eb00d6af..70416c81 100644
import org.bukkit.event.Event;
/**
* Miscellaneous server events
*/
@@ -0,0 +0,0 @@ import org.bukkit.event.Event;
public abstract class ServerEvent extends Event {
+ // Paper start
+ public ServerEvent(boolean isAsync) {
+ super(isAsync);
+ }
+
+ public ServerEvent() {
+ super(!Bukkit.isPrimaryThread());
+ }
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/event/server/ServerListPingEvent.java b/src/main/java/org/bukkit/event/server/ServerListPingEvent.java
index d873763d..b68d7b2f 100644
--- a/src/main/java/org/bukkit/event/server/ServerListPingEvent.java
+++ b/src/main/java/org/bukkit/event/server/ServerListPingEvent.java
@@ -0,0 +0,0 @@ public class ServerListPingEvent extends ServerEvent implements Iterable<Player>
private int maxPlayers;
public ServerListPingEvent(@NotNull final InetAddress address, @NotNull final String motd, final int numPlayers, final int maxPlayers) {
+ super(); // Paper - Is this event being fired async?
Validate.isTrue(numPlayers >= 0, "Cannot have negative number of players online", numPlayers);
this.address = address;
this.motd = motd;
@@ -0,0 +0,0 @@ public class ServerListPingEvent extends ServerEvent implements Iterable<Player>
* @param maxPlayers the max number of players
*/
protected ServerListPingEvent(@NotNull final InetAddress address, @NotNull final String motd, final int maxPlayers) {
+ super(); // Paper - Is this event being fired async?
this.numPlayers = MAGIC_PLAYER_COUNT;
this.address = address;
this.motd = motd;
public ServerEvent() {
- super();
+ super(!Bukkit.isPrimaryThread()); // Paper
}
public ServerEvent(boolean isAsync) {
--