Updated Upstream (Bukkit/CraftBukkit/Spigot) (#8515)
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 9a4de097 SPIGOT-7171: Ability to get the IP/hostname players are requesting status of CraftBukkit Changes: f43634ae4 SPIGOT-7170: Cannot set slots in custom smithing inventory 48f3a2258 SPIGOT-7171: Ability to get the IP/hostname players are requesting status of 30e31b4d1 SPIGOT-7177: Certain blocks don't call BlockCanBuildEvent 982364797 SPIGOT-7174: Avoid adding air to CraftMetaBundle Spigot Changes: 6198b5ae PR-122: Add missing parentheses to pumpkin and melon growth modifier 1aec3fc1 Rebuild patches
This commit is contained in:
parent
13cf5461d4
commit
b3b04f2ca1
43 changed files with 184 additions and 178 deletions
|
@ -3435,11 +3435,11 @@ 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 92941af574945936c3714718ed3eea23697c99df..5b8a7b897d9f9d8df3705eef36388f41be4531a6 100644
|
||||
index cf13380b23b70edb73b5879397b64b24a1088729..77173e1ca3ce972632608c620aa1a2fffed27e04 100644
|
||||
--- a/src/main/java/org/bukkit/event/server/ServerListPingEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/server/ServerListPingEvent.java
|
||||
@@ -22,15 +22,16 @@ public class ServerListPingEvent extends ServerEvent implements Iterable<Player>
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
@@ -23,7 +23,7 @@ public class ServerListPingEvent extends ServerEvent implements Iterable<Player>
|
||||
private final String hostname;
|
||||
private final InetAddress address;
|
||||
private final boolean shouldSendChatPreviews;
|
||||
- private String motd;
|
||||
|
@ -3447,35 +3447,40 @@ index 92941af574945936c3714718ed3eea23697c99df..5b8a7b897d9f9d8df3705eef36388f41
|
|||
private final int numPlayers;
|
||||
private int maxPlayers;
|
||||
|
||||
+ @Deprecated // Paper
|
||||
public ServerListPingEvent(@NotNull final InetAddress address, @NotNull final String motd, final boolean shouldSendChatPreviews, final int numPlayers, final int maxPlayers) {
|
||||
super(true);
|
||||
@@ -37,7 +37,7 @@ public class ServerListPingEvent extends ServerEvent implements Iterable<Player>
|
||||
Preconditions.checkArgument(numPlayers >= 0, "Cannot have negative number of players online", numPlayers);
|
||||
this.hostname = hostname;
|
||||
this.address = address;
|
||||
- this.motd = motd;
|
||||
+ this.motd = net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(motd); // Paper
|
||||
this.shouldSendChatPreviews = shouldSendChatPreviews;
|
||||
this.numPlayers = numPlayers;
|
||||
this.maxPlayers = maxPlayers;
|
||||
@@ -45,15 +46,61 @@ public class ServerListPingEvent extends ServerEvent implements Iterable<Player>
|
||||
@@ -58,16 +58,83 @@ public class ServerListPingEvent extends ServerEvent implements Iterable<Player>
|
||||
* @param motd the message of the day
|
||||
* @param shouldSendChatPreviews if the server should send chat previews
|
||||
* @param maxPlayers the max number of players
|
||||
+ * @deprecated in favour of {@link #ServerListPingEvent(java.net.InetAddress, net.kyori.adventure.text.Component, boolean, int)}
|
||||
+ * @deprecated in favour of {@link #ServerListPingEvent(String, java.net.InetAddress, net.kyori.adventure.text.Component, boolean, int)}
|
||||
*/
|
||||
+ @Deprecated // Paper
|
||||
protected ServerListPingEvent(@NotNull final InetAddress address, @NotNull final String motd, boolean shouldSendChatPreviews, final int maxPlayers) {
|
||||
protected ServerListPingEvent(@NotNull final String hostname, @NotNull final InetAddress address, @NotNull final String motd, boolean shouldSendChatPreviews, final int maxPlayers) {
|
||||
super(true);
|
||||
this.numPlayers = MAGIC_PLAYER_COUNT;
|
||||
this.hostname = hostname;
|
||||
this.address = address;
|
||||
+ this.motd = net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(motd); // Paper
|
||||
+ this.shouldSendChatPreviews = shouldSendChatPreviews;
|
||||
+ this.maxPlayers = maxPlayers;
|
||||
+ }
|
||||
+ // Paper start
|
||||
+ @Deprecated
|
||||
+ public ServerListPingEvent(@NotNull final InetAddress address, @NotNull final net.kyori.adventure.text.Component motd, boolean shouldSendChatPreviews, final int numPlayers, final int maxPlayers) {
|
||||
+ this("", address, motd, shouldSendChatPreviews, numPlayers, maxPlayers);
|
||||
+ }
|
||||
+ public ServerListPingEvent(@NotNull final String hostname, @NotNull final InetAddress address, @NotNull final net.kyori.adventure.text.Component motd, boolean shouldSendChatPreviews, final int numPlayers, final int maxPlayers) {
|
||||
+ super(true);
|
||||
+ Preconditions.checkArgument(numPlayers >= 0, "Cannot have negative number of players online (%s)", numPlayers);
|
||||
+ this.hostname = hostname;
|
||||
+ this.address = address;
|
||||
this.motd = motd;
|
||||
this.shouldSendChatPreviews = shouldSendChatPreviews;
|
||||
|
@ -3490,10 +3495,26 @@ index 92941af574945936c3714718ed3eea23697c99df..5b8a7b897d9f9d8df3705eef36388f41
|
|||
+ * @param address the address of the pinger
|
||||
+ * @param motd the message of the day
|
||||
+ * @param maxPlayers the max number of players
|
||||
+ * @deprecated in favour of {@link #ServerListPingEvent(String, java.net.InetAddress, net.kyori.adventure.text.Component, boolean, int)}
|
||||
+ */
|
||||
+ @Deprecated
|
||||
+ protected ServerListPingEvent(@NotNull final InetAddress address, @NotNull final net.kyori.adventure.text.Component motd, boolean shouldSendChatPreviews, final int maxPlayers) {
|
||||
+ super(true);
|
||||
+ this("", address, motd, shouldSendChatPreviews, maxPlayers);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * This constructor is intended for implementations that provide the
|
||||
+ * {@link #iterator()} method, thus provided the {@link #getNumPlayers()}
|
||||
+ * count.
|
||||
+ *
|
||||
+ * @param hostname The hostname that was used to connect to the server
|
||||
+ * @param address the address of the pinger
|
||||
+ * @param motd the message of the day
|
||||
+ * @param maxPlayers the max number of players
|
||||
+ */
|
||||
+ protected ServerListPingEvent(final @NotNull String hostname, final @NotNull InetAddress address, final @NotNull net.kyori.adventure.text.Component motd, final boolean shouldSendChatPreviews, final int maxPlayers) {
|
||||
+ this.numPlayers = MAGIC_PLAYER_COUNT;
|
||||
+ this.hostname = hostname;
|
||||
+ this.address = address;
|
||||
+ this.motd = motd;
|
||||
+ this.shouldSendChatPreviews = shouldSendChatPreviews;
|
||||
|
@ -3518,8 +3539,8 @@ index 92941af574945936c3714718ed3eea23697c99df..5b8a7b897d9f9d8df3705eef36388f41
|
|||
+ // Paper end
|
||||
|
||||
/**
|
||||
* Get the address the ping is coming from.
|
||||
@@ -69,19 +116,23 @@ public class ServerListPingEvent extends ServerEvent implements Iterable<Player>
|
||||
* Gets the hostname that the player used to connect to the server, or
|
||||
@@ -94,19 +161,23 @@ public class ServerListPingEvent extends ServerEvent implements Iterable<Player>
|
||||
* Get the message of the day message.
|
||||
*
|
||||
* @return the message of the day
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue