Update to Minecraft 1.19.3

By: md_5 <git@md-5.net>
This commit is contained in:
Bukkit/Spigot
2022-12-08 03:13:00 +11:00
parent 6ea8b24628
commit 7a87d86241
30 changed files with 831 additions and 40 deletions

View File

@@ -133,7 +133,11 @@ public enum InventoryType {
/**
* Pseudo composter inventory with 0 or 1 slots of undefined type.
*/
COMPOSTER(1, "Composter")
COMPOSTER(1, "Composter"),
/**
* Pseudo chiseled bookshelf inventory, with 6 slots of undefined type.
*/
CHISELED_BOOKSHELF(6, "Chiseled Bookshelf"),
;
private final int size;

View File

@@ -11,7 +11,7 @@ import org.jetbrains.annotations.NotNull;
* of the corresponding {@link AsyncPlayerChatEvent} <b>must</b> be formatted in
* the same way.
*
* @deprecated draft API
* @deprecated chat previews have been removed
*/
@Deprecated
@Warning(false)

View File

@@ -22,32 +22,20 @@ public class ServerListPingEvent extends ServerEvent implements Iterable<Player>
private static final HandlerList handlers = new HandlerList();
private final String hostname;
private final InetAddress address;
private final boolean shouldSendChatPreviews;
private String motd;
private final int numPlayers;
private int maxPlayers;
@Deprecated
public ServerListPingEvent(@NotNull final InetAddress address, @NotNull final String motd, final 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 String motd, final boolean shouldSendChatPreviews, final int numPlayers, final int maxPlayers) {
public ServerListPingEvent(@NotNull final String hostname, @NotNull final InetAddress address, @NotNull final String motd, final int numPlayers, final int maxPlayers) {
super(true);
Preconditions.checkArgument(numPlayers >= 0, "Cannot have negative number of players online", numPlayers);
this.hostname = hostname;
this.address = address;
this.motd = motd;
this.shouldSendChatPreviews = shouldSendChatPreviews;
this.numPlayers = numPlayers;
this.maxPlayers = maxPlayers;
}
@Deprecated
protected ServerListPingEvent(@NotNull final InetAddress address, @NotNull final String motd, boolean shouldSendChatPreviews, final int maxPlayers) {
this("", address, motd, shouldSendChatPreviews, maxPlayers);
}
/**
* This constructor is intended for implementations that provide the
* {@link #iterator()} method, thus provided the {@link #getNumPlayers()}
@@ -56,16 +44,14 @@ public class ServerListPingEvent extends ServerEvent implements Iterable<Player>
* @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 shouldSendChatPreviews if the server should send chat previews
* @param maxPlayers the max number of players
*/
protected ServerListPingEvent(@NotNull final String hostname, @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, final int maxPlayers) {
super(true);
this.numPlayers = MAGIC_PLAYER_COUNT;
this.hostname = hostname;
this.address = address;
this.motd = motd;
this.shouldSendChatPreviews = shouldSendChatPreviews;
this.maxPlayers = maxPlayers;
}
@@ -139,9 +125,11 @@ public class ServerListPingEvent extends ServerEvent implements Iterable<Player>
* client.
*
* @return true if chat preview is enabled, false otherwise
* @deprecated chat previews have been removed
*/
@Deprecated
public boolean shouldSendChatPreviews() {
return shouldSendChatPreviews;
return false;
}
/**