Adventure 4.24.0 (#12908)

This commit is contained in:
Kezz
2025-07-30 18:43:51 +01:00
committed by GitHub
parent a4da45e3b2
commit ec9c83fa2b
4 changed files with 15 additions and 2 deletions

View File

@@ -11,7 +11,7 @@ java {
val annotationsVersion = "26.0.2" val annotationsVersion = "26.0.2"
// Keep in sync with paper-server adventure-text-serializer-ansi dep // Keep in sync with paper-server adventure-text-serializer-ansi dep
val adventureVersion = "4.23.0" val adventureVersion = "4.24.0"
val bungeeCordChatVersion = "1.21-R0.2-deprecated+build.21" val bungeeCordChatVersion = "1.21-R0.2-deprecated+build.21"
val slf4jVersion = "2.0.16" val slf4jVersion = "2.0.16"
val log4jVersion = "2.24.1" val log4jVersion = "2.24.1"

View File

@@ -134,7 +134,7 @@ dependencies {
implementation("org.jline:jline-terminal-ffm:3.27.1") // use ffm on java 22+ implementation("org.jline:jline-terminal-ffm:3.27.1") // use ffm on java 22+
implementation("org.jline:jline-terminal-jni:3.27.1") // fall back to jni on java 21 implementation("org.jline:jline-terminal-jni:3.27.1") // fall back to jni on java 21
implementation("net.minecrell:terminalconsoleappender:1.3.0") implementation("net.minecrell:terminalconsoleappender:1.3.0")
implementation("net.kyori:adventure-text-serializer-ansi:4.23.0") // Keep in sync with adventureVersion from Paper-API build file implementation("net.kyori:adventure-text-serializer-ansi:4.24.0") // Keep in sync with adventureVersion from Paper-API build file
runtimeConfiguration(sourceSets.main.map { it.runtimeClasspath }) runtimeConfiguration(sourceSets.main.map { it.runtimeClasspath })
/* /*

View File

@@ -19,6 +19,7 @@ import net.kyori.adventure.resource.ResourcePackCallback;
import net.kyori.adventure.resource.ResourcePackInfo; import net.kyori.adventure.resource.ResourcePackInfo;
import net.kyori.adventure.resource.ResourcePackRequest; import net.kyori.adventure.resource.ResourcePackRequest;
import net.minecraft.network.chat.Component; import net.minecraft.network.chat.Component;
import net.minecraft.network.protocol.common.ClientboundClearDialogPacket;
import net.minecraft.network.protocol.common.ClientboundResourcePackPopPacket; import net.minecraft.network.protocol.common.ClientboundResourcePackPopPacket;
import net.minecraft.network.protocol.common.ClientboundResourcePackPushPacket; import net.minecraft.network.protocol.common.ClientboundResourcePackPushPacket;
import net.minecraft.network.protocol.common.ClientboundShowDialogPacket; import net.minecraft.network.protocol.common.ClientboundShowDialogPacket;
@@ -73,6 +74,11 @@ public class PaperPlayerConfigurationConnection extends PaperCommonConnection<Se
this.handle.send(new ClientboundShowDialogPacket(PaperDialog.bukkitToMinecraftHolder((Dialog) dialog))); this.handle.send(new ClientboundShowDialogPacket(PaperDialog.bukkitToMinecraftHolder((Dialog) dialog)));
} }
@Override
public void closeDialog() {
this.handle.send(ClientboundClearDialogPacket.INSTANCE);
}
@Override @Override
public Pointers pointers() { public Pointers pointers() {
if (this.adventurePointers == null) { if (this.adventurePointers == null) {

View File

@@ -57,6 +57,7 @@ import net.minecraft.core.Holder;
import net.minecraft.core.SectionPos; import net.minecraft.core.SectionPos;
import net.minecraft.network.chat.Component; import net.minecraft.network.chat.Component;
import net.minecraft.network.chat.PlayerChatMessage; import net.minecraft.network.chat.PlayerChatMessage;
import net.minecraft.network.protocol.common.ClientboundClearDialogPacket;
import net.minecraft.network.protocol.common.ClientboundCustomPayloadPacket; import net.minecraft.network.protocol.common.ClientboundCustomPayloadPacket;
import net.minecraft.network.protocol.common.ClientboundResourcePackPopPacket; import net.minecraft.network.protocol.common.ClientboundResourcePackPopPacket;
import net.minecraft.network.protocol.common.ClientboundResourcePackPushPacket; import net.minecraft.network.protocol.common.ClientboundResourcePackPushPacket;
@@ -2497,6 +2498,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player, PluginMessa
this.getHandle().openDialog(PaperDialog.bukkitToMinecraftHolder((Dialog) dialog)); this.getHandle().openDialog(PaperDialog.bukkitToMinecraftHolder((Dialog) dialog));
} }
@Override
public void closeDialog() {
if (this.getHandle().connection == null) return;
this.getHandle().connection.send(ClientboundClearDialogPacket.INSTANCE);
}
// Paper start - more resource pack API // Paper start - more resource pack API
@Override @Override
public org.bukkit.event.player.PlayerResourcePackStatusEvent.Status getResourcePackStatus() { public org.bukkit.event.player.PlayerResourcePackStatusEvent.Status getResourcePackStatus() {