API now compiles successfully

This commit is contained in:
Jake Potrebic 2022-06-07 13:31:10 -07:00
parent 88f74d1bac
commit 13fe88643e
No known key found for this signature in database
GPG key ID: ECE0B3C133C016C5
6 changed files with 22 additions and 24 deletions

View file

@ -3218,7 +3218,7 @@ index 03bfca9d368bbe4b7c1353d52c883e756bf69bda..943d324435350d3f16fad3e21cb472a0
/**
diff --git a/src/main/java/org/bukkit/event/server/ServerListPingEvent.java b/src/main/java/org/bukkit/event/server/ServerListPingEvent.java
index b9abfdc61f76c5562de6649f8440aeaab536b3be..12cdae95c338d21684991d34aea5a643f4b4bcd3 100644
index b9abfdc61f76c5562de6649f8440aeaab536b3be..c4644f3fd231bff35627ff667e37ccdefbfdbb88 100644
--- a/src/main/java/org/bukkit/event/server/ServerListPingEvent.java
+++ b/src/main/java/org/bukkit/event/server/ServerListPingEvent.java
@@ -21,15 +21,16 @@ public class ServerListPingEvent extends ServerEvent implements Iterable<Player>
@ -3257,7 +3257,7 @@ index b9abfdc61f76c5562de6649f8440aeaab536b3be..12cdae95c338d21684991d34aea5a643
+ // Paper start
+ public ServerListPingEvent(@NotNull final InetAddress address, @NotNull final net.kyori.adventure.text.Component motd, final int numPlayers, final int maxPlayers) {
+ super(true);
+ Validate.isTrue(numPlayers >= 0, "Cannot have negative number of players online", numPlayers);
+ Preconditions.checkArgument(numPlayers >= 0, "Cannot have negative number of players online (%s)", numPlayers);
+ this.address = address;
this.motd = motd;
+ this.numPlayers = numPlayers;