diff --git a/patches/api/Use-ASM-for-event-executors.patch b/patches/api/Use-ASM-for-event-executors.patch index 57cdbcfe52..253f11b2c0 100644 --- a/patches/api/Use-ASM-for-event-executors.patch +++ b/patches/api/Use-ASM-for-event-executors.patch @@ -5,6 +5,19 @@ Subject: [PATCH] Use ASM for event executors. Uses method handles for private or static methods. +diff --git a/build.gradle.kts b/build.gradle.kts +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/build.gradle.kts ++++ b/build.gradle.kts +@@ -0,0 +0,0 @@ dependencies { + api("net.kyori:adventure-text-serializer-gson") + api("net.kyori:adventure-text-serializer-legacy") + api("net.kyori:adventure-text-serializer-plain") ++ api("org.ow2.asm:asm:9.0") ++ api("org.ow2.asm:asm-commons:9.0") + + compileOnly("org.apache.maven:maven-resolver-provider:3.8.1") + compileOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.7.0") diff --git a/pom.xml b/pom.xml index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/pom.xml diff --git a/patches/server/Player-Tab-List-and-Title-APIs.patch b/patches/server/Player-Tab-List-and-Title-APIs.patch index d184e25415..4cbcb45081 100644 --- a/patches/server/Player-Tab-List-and-Title-APIs.patch +++ b/patches/server/Player-Tab-List-and-Title-APIs.patch @@ -76,12 +76,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + + @Override + public void setTitleTimes(int fadeInTicks, int stayTicks, int fadeOutTicks) { -+ getHandle().connection.send(new ClientboundSetTitlesPacket(ClientboundSetTitlesPacket.Type.TIMES, (BaseComponent[]) null, fadeInTicks, stayTicks, fadeOutTicks)); ++ getHandle().connection.send(new ClientboundSetTitlesAnimationPacket(fadeInTicks, stayTicks, fadeOutTicks)); + } + + @Override + public void setSubtitle(BaseComponent[] subtitle) { -+ getHandle().connection.send(new ClientboundSetTitlesPacket(ClientboundSetTitlesPacket.Type.SUBTITLE, subtitle, 0, 0, 0)); ++ final String json = net.md_5.bungee.chat.ComponentSerializer.toString(subtitle); ++ getHandle().connection.send(new ClientboundSetSubtitleTextPacket(Component.Serializer.fromJson(json))); + } + + @Override @@ -91,7 +92,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + + @Override + public void showTitle(BaseComponent[] title) { -+ getHandle().connection.send(new ClientboundSetTitlesPacket(ClientboundSetTitlesPacket.Type.TITLE, title, 0, 0, 0)); ++ final String json = net.md_5.bungee.chat.ComponentSerializer.toString(title); ++ getHandle().connection.send(new ClientboundSetTitleTextPacket(Component.Serializer.fromJson(json))); + } + + @Override @@ -133,7 +135,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + + @Override + public void hideTitle() { -+ getHandle().connection.send(new ClientboundSetTitlesPacket(ClientboundSetTitlesPacket.Type.CLEAR, (BaseComponent[]) null, 0, 0, 0)); ++ getHandle().connection.send(new ClientboundClearTitlesPacket(false)); + } + // Paper end +