Updated Upstream (Bukkit/CraftBukkit) (#8015)
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: 05ae036c PR-746: Add option to use cached map color palette 57849c1b PR-759: Add preview chat option in ServerListPingEvent 0169e65d PR-758: Add missing server properties methods from 1.19 CraftBukkit Changes: 622dbe6c2 SPIGOT-7068: SKULK and SKULK_VEIN BlockSpreadEvents Still do not reference the correct source (SKULK_CATALYST) 6c61b73f3 PR-1052: Add option to use cached map color palette c882f38ea SPIGOT-7066: Fix custom END worlds not generating DragonBattle 6866aab59 SPIGOT-2420: Can't set exp drops for EnderDragon death 9dcd46530 PR-1067: Add preview chat option in ServerListPingEvent 36c2681af PR-1066: Add missing server properties methods from 1.19 031eaadd0 Increase outdated build delay 8fda4b12f SPIGOT-7060: SCULK and SCULK_VEIN BlockSpreadEvents do not reference the correct source
This commit is contained in:
parent
ed9cf5ca08
commit
fb2c24b36d
99 changed files with 361 additions and 358 deletions
|
@ -475,7 +475,7 @@ index 0000000000000000000000000000000000000000..bff9a6295db367c6b89d69fb55459a40
|
|||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||
index c15861905d7af679c4f6ffc27719a900b0fe4284..d5fdc57ffcfac4eb18d7fbf44ce13257915b4afb 100644
|
||||
index 9db999c8c9645fa0161bc3a85fbfdd09283989fd..b23b6bf1af91c9460fdb231000df6191ec673544 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -357,7 +357,9 @@ public final class Bukkit {
|
||||
|
@ -488,7 +488,7 @@ index c15861905d7af679c4f6ffc27719a900b0fe4284..d5fdc57ffcfac4eb18d7fbf44ce13257
|
|||
public static int broadcastMessage(@NotNull String message) {
|
||||
return server.broadcastMessage(message);
|
||||
}
|
||||
@@ -1051,6 +1053,19 @@ public final class Bukkit {
|
||||
@@ -1071,6 +1073,19 @@ public final class Bukkit {
|
||||
server.shutdown();
|
||||
}
|
||||
|
||||
|
@ -508,7 +508,7 @@ index c15861905d7af679c4f6ffc27719a900b0fe4284..d5fdc57ffcfac4eb18d7fbf44ce13257
|
|||
/**
|
||||
* Broadcasts the specified message to every user with the given
|
||||
* permission name.
|
||||
@@ -1060,6 +1075,21 @@ public final class Bukkit {
|
||||
@@ -1080,6 +1095,21 @@ public final class Bukkit {
|
||||
* permissibles} must have to receive the broadcast
|
||||
* @return number of message recipients
|
||||
*/
|
||||
|
@ -530,7 +530,7 @@ index c15861905d7af679c4f6ffc27719a900b0fe4284..d5fdc57ffcfac4eb18d7fbf44ce13257
|
|||
public static int broadcast(@NotNull String message, @NotNull String permission) {
|
||||
return server.broadcast(message, permission);
|
||||
}
|
||||
@@ -1298,6 +1328,7 @@ public final class Bukkit {
|
||||
@@ -1318,6 +1348,7 @@ public final class Bukkit {
|
||||
return server.createInventory(owner, type);
|
||||
}
|
||||
|
||||
|
@ -538,7 +538,7 @@ index c15861905d7af679c4f6ffc27719a900b0fe4284..d5fdc57ffcfac4eb18d7fbf44ce13257
|
|||
/**
|
||||
* Creates an empty inventory with the specified type and title. If the type
|
||||
* is {@link InventoryType#CHEST}, the new inventory has a size of 27;
|
||||
@@ -1323,6 +1354,38 @@ public final class Bukkit {
|
||||
@@ -1343,6 +1374,38 @@ public final class Bukkit {
|
||||
* @see InventoryType#isCreatable()
|
||||
*/
|
||||
@NotNull
|
||||
|
@ -577,7 +577,7 @@ index c15861905d7af679c4f6ffc27719a900b0fe4284..d5fdc57ffcfac4eb18d7fbf44ce13257
|
|||
public static Inventory createInventory(@Nullable InventoryHolder owner, @NotNull InventoryType type, @NotNull String title) {
|
||||
return server.createInventory(owner, type, title);
|
||||
}
|
||||
@@ -1341,6 +1404,7 @@ public final class Bukkit {
|
||||
@@ -1361,6 +1424,7 @@ public final class Bukkit {
|
||||
return server.createInventory(owner, size);
|
||||
}
|
||||
|
||||
|
@ -585,7 +585,7 @@ index c15861905d7af679c4f6ffc27719a900b0fe4284..d5fdc57ffcfac4eb18d7fbf44ce13257
|
|||
/**
|
||||
* Creates an empty inventory of type {@link InventoryType#CHEST} with the
|
||||
* specified size and title.
|
||||
@@ -1353,10 +1417,30 @@ public final class Bukkit {
|
||||
@@ -1373,10 +1437,30 @@ public final class Bukkit {
|
||||
* @throws IllegalArgumentException if the size is not a multiple of 9
|
||||
*/
|
||||
@NotNull
|
||||
|
@ -616,7 +616,7 @@ index c15861905d7af679c4f6ffc27719a900b0fe4284..d5fdc57ffcfac4eb18d7fbf44ce13257
|
|||
/**
|
||||
* Creates an empty merchant.
|
||||
*
|
||||
@@ -1364,7 +1448,20 @@ public final class Bukkit {
|
||||
@@ -1384,7 +1468,20 @@ public final class Bukkit {
|
||||
* when the merchant inventory is viewed
|
||||
* @return a new merchant
|
||||
*/
|
||||
|
@ -637,7 +637,7 @@ index c15861905d7af679c4f6ffc27719a900b0fe4284..d5fdc57ffcfac4eb18d7fbf44ce13257
|
|||
public static Merchant createMerchant(@Nullable String title) {
|
||||
return server.createMerchant(title);
|
||||
}
|
||||
@@ -1470,22 +1567,47 @@ public final class Bukkit {
|
||||
@@ -1501,22 +1598,47 @@ public final class Bukkit {
|
||||
return server.isPrimaryThread();
|
||||
}
|
||||
|
||||
|
@ -810,7 +810,7 @@ index 803fa0019869127ee8c7e4fb1777a59c43e66f8a..c65f0d6569c130b4920a9e71ad24af64
|
|||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index cf53aead2eb5a52f1505ca694e95108fce28aa18..14b078e8fa4347dd0e186e5847693904e4ceb9df 100644
|
||||
index 485848dfa12bda15adda0d8f3a83f779a9ec05fe..01f4329d23a5e33f321df394107eaf1b918f8859 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -58,13 +58,13 @@ import org.jetbrains.annotations.Nullable;
|
||||
|
@ -848,7 +848,7 @@ index cf53aead2eb5a52f1505ca694e95108fce28aa18..14b078e8fa4347dd0e186e5847693904
|
|||
public int broadcastMessage(@NotNull String message);
|
||||
|
||||
/**
|
||||
@@ -894,8 +896,33 @@ public interface Server extends PluginMessageRecipient {
|
||||
@@ -910,8 +912,33 @@ public interface Server extends PluginMessageRecipient {
|
||||
* @param permission the required permission {@link Permissible
|
||||
* permissibles} must have to receive the broadcast
|
||||
* @return number of message recipients
|
||||
|
@ -882,7 +882,7 @@ index cf53aead2eb5a52f1505ca694e95108fce28aa18..14b078e8fa4347dd0e186e5847693904
|
|||
|
||||
/**
|
||||
* Gets the player by the given name, regardless if they are offline or
|
||||
@@ -1093,6 +1120,7 @@ public interface Server extends PluginMessageRecipient {
|
||||
@@ -1109,6 +1136,7 @@ public interface Server extends PluginMessageRecipient {
|
||||
@NotNull
|
||||
Inventory createInventory(@Nullable InventoryHolder owner, @NotNull InventoryType type);
|
||||
|
||||
|
@ -890,7 +890,7 @@ index cf53aead2eb5a52f1505ca694e95108fce28aa18..14b078e8fa4347dd0e186e5847693904
|
|||
/**
|
||||
* Creates an empty inventory with the specified type and title. If the type
|
||||
* is {@link InventoryType#CHEST}, the new inventory has a size of 27;
|
||||
@@ -1118,6 +1146,36 @@ public interface Server extends PluginMessageRecipient {
|
||||
@@ -1134,6 +1162,36 @@ public interface Server extends PluginMessageRecipient {
|
||||
* @see InventoryType#isCreatable()
|
||||
*/
|
||||
@NotNull
|
||||
|
@ -927,7 +927,7 @@ index cf53aead2eb5a52f1505ca694e95108fce28aa18..14b078e8fa4347dd0e186e5847693904
|
|||
Inventory createInventory(@Nullable InventoryHolder owner, @NotNull InventoryType type, @NotNull String title);
|
||||
|
||||
/**
|
||||
@@ -1132,6 +1190,22 @@ public interface Server extends PluginMessageRecipient {
|
||||
@@ -1148,6 +1206,22 @@ public interface Server extends PluginMessageRecipient {
|
||||
@NotNull
|
||||
Inventory createInventory(@Nullable InventoryHolder owner, int size) throws IllegalArgumentException;
|
||||
|
||||
|
@ -950,7 +950,7 @@ index cf53aead2eb5a52f1505ca694e95108fce28aa18..14b078e8fa4347dd0e186e5847693904
|
|||
/**
|
||||
* Creates an empty inventory of type {@link InventoryType#CHEST} with the
|
||||
* specified size and title.
|
||||
@@ -1142,10 +1216,13 @@ public interface Server extends PluginMessageRecipient {
|
||||
@@ -1158,10 +1232,13 @@ public interface Server extends PluginMessageRecipient {
|
||||
* viewed
|
||||
* @return a new inventory
|
||||
* @throws IllegalArgumentException if the size is not a multiple of 9
|
||||
|
@ -964,7 +964,7 @@ index cf53aead2eb5a52f1505ca694e95108fce28aa18..14b078e8fa4347dd0e186e5847693904
|
|||
/**
|
||||
* Creates an empty merchant.
|
||||
*
|
||||
@@ -1153,7 +1230,18 @@ public interface Server extends PluginMessageRecipient {
|
||||
@@ -1169,7 +1246,18 @@ public interface Server extends PluginMessageRecipient {
|
||||
* when the merchant inventory is viewed
|
||||
* @return a new merchant
|
||||
*/
|
||||
|
@ -983,7 +983,7 @@ index cf53aead2eb5a52f1505ca694e95108fce28aa18..14b078e8fa4347dd0e186e5847693904
|
|||
Merchant createMerchant(@Nullable String title);
|
||||
|
||||
/**
|
||||
@@ -1240,20 +1328,41 @@ public interface Server extends PluginMessageRecipient {
|
||||
@@ -1265,20 +1353,41 @@ public interface Server extends PluginMessageRecipient {
|
||||
*/
|
||||
boolean isPrimaryThread();
|
||||
|
||||
|
@ -1025,7 +1025,7 @@ index cf53aead2eb5a52f1505ca694e95108fce28aa18..14b078e8fa4347dd0e186e5847693904
|
|||
String getShutdownMessage();
|
||||
|
||||
/**
|
||||
@@ -1610,7 +1719,9 @@ public interface Server extends PluginMessageRecipient {
|
||||
@@ -1635,7 +1744,9 @@ public interface Server extends PluginMessageRecipient {
|
||||
* Sends the component to the player
|
||||
*
|
||||
* @param component the components to send
|
||||
|
@ -1035,7 +1035,7 @@ index cf53aead2eb5a52f1505ca694e95108fce28aa18..14b078e8fa4347dd0e186e5847693904
|
|||
public void broadcast(@NotNull net.md_5.bungee.api.chat.BaseComponent component) {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
@@ -1619,7 +1730,9 @@ public interface Server extends PluginMessageRecipient {
|
||||
@@ -1644,7 +1755,9 @@ public interface Server extends PluginMessageRecipient {
|
||||
* Sends an array of components as a single message to the player
|
||||
*
|
||||
* @param components the components to send
|
||||
|
@ -3240,48 +3240,50 @@ 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..c4644f3fd231bff35627ff667e37ccdefbfdbb88 100644
|
||||
index 92941af574945936c3714718ed3eea23697c99df..5b8a7b897d9f9d8df3705eef36388f41be4531a6 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>
|
||||
private static final int MAGIC_PLAYER_COUNT = Integer.MIN_VALUE;
|
||||
@@ -22,15 +22,16 @@ public class ServerListPingEvent extends ServerEvent implements Iterable<Player>
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private final InetAddress address;
|
||||
private final boolean shouldSendChatPreviews;
|
||||
- private String motd;
|
||||
+ private net.kyori.adventure.text.Component motd; // Paper
|
||||
private final int numPlayers;
|
||||
private int maxPlayers;
|
||||
|
||||
+ @Deprecated // Paper
|
||||
public ServerListPingEvent(@NotNull final InetAddress address, @NotNull final String motd, final int numPlayers, final int maxPlayers) {
|
||||
public ServerListPingEvent(@NotNull final InetAddress address, @NotNull final String motd, final boolean shouldSendChatPreviews, final int numPlayers, final int maxPlayers) {
|
||||
super(true);
|
||||
Preconditions.checkArgument(numPlayers >= 0, "Cannot have negative number of players online", numPlayers);
|
||||
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;
|
||||
}
|
||||
@@ -42,14 +43,58 @@ public class ServerListPingEvent extends ServerEvent implements Iterable<Player>
|
||||
* @param address the address of the pinger
|
||||
@@ -45,15 +46,61 @@ 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, int)}
|
||||
+ * @deprecated in favour of {@link #ServerListPingEvent(java.net.InetAddress, net.kyori.adventure.text.Component, boolean, int)}
|
||||
*/
|
||||
+ @Deprecated // Paper
|
||||
protected ServerListPingEvent(@NotNull final InetAddress address, @NotNull final String motd, final int maxPlayers) {
|
||||
protected ServerListPingEvent(@NotNull final InetAddress address, @NotNull final String motd, boolean shouldSendChatPreviews, final int maxPlayers) {
|
||||
super(true);
|
||||
this.numPlayers = MAGIC_PLAYER_COUNT;
|
||||
this.address = address;
|
||||
+ this.motd = net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(motd); // Paper
|
||||
+ this.shouldSendChatPreviews = shouldSendChatPreviews;
|
||||
+ this.maxPlayers = maxPlayers;
|
||||
+ }
|
||||
+ // Paper start
|
||||
+ public ServerListPingEvent(@NotNull final InetAddress address, @NotNull final net.kyori.adventure.text.Component motd, final int numPlayers, final int maxPlayers) {
|
||||
+ public ServerListPingEvent(@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.address = address;
|
||||
this.motd = motd;
|
||||
this.shouldSendChatPreviews = shouldSendChatPreviews;
|
||||
+ this.numPlayers = numPlayers;
|
||||
this.maxPlayers = maxPlayers;
|
||||
}
|
||||
|
@ -3294,11 +3296,12 @@ index b9abfdc61f76c5562de6649f8440aeaab536b3be..c4644f3fd231bff35627ff667e37ccde
|
|||
+ * @param motd the message of the day
|
||||
+ * @param maxPlayers the max number of players
|
||||
+ */
|
||||
+ protected ServerListPingEvent(@NotNull final InetAddress address, @NotNull final net.kyori.adventure.text.Component motd, final int maxPlayers) {
|
||||
+ protected ServerListPingEvent(@NotNull final InetAddress address, @NotNull final net.kyori.adventure.text.Component motd, boolean shouldSendChatPreviews, final int maxPlayers) {
|
||||
+ super(true);
|
||||
+ this.numPlayers = MAGIC_PLAYER_COUNT;
|
||||
+ this.address = address;
|
||||
+ this.motd = motd;
|
||||
+ this.shouldSendChatPreviews = shouldSendChatPreviews;
|
||||
+ this.maxPlayers = maxPlayers;
|
||||
+ }
|
||||
+ /**
|
||||
|
@ -3321,7 +3324,7 @@ index b9abfdc61f76c5562de6649f8440aeaab536b3be..c4644f3fd231bff35627ff667e37ccde
|
|||
|
||||
/**
|
||||
* Get the address the ping is coming from.
|
||||
@@ -65,19 +110,23 @@ public class ServerListPingEvent extends ServerEvent implements Iterable<Player>
|
||||
@@ -69,19 +116,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