Skip to content

Commit

Permalink
Work around relocation of adventure breaking on velocity with retroop…
Browse files Browse the repository at this point in the history
…er#842

Caused by only serializer implementations being shaded on velocity
On spigot, the entirety of adventure is shaded into the final jar
  • Loading branch information
booky10 committed Jun 22, 2024
1 parent 68eb537 commit ee20abd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ tasks {
archiveFileName = "packetevents-${project.name}-${project.version}.jar"
archiveClassifier = null

relocate("net.kyori.adventure.text.serializer", "io.github.retrooper.packetevents.adventure.serializer")
relocate("net.kyori.option", "io.github.retrooper.packetevents.adventure.option")
dependencies {
exclude(dependency("com.google.code.gson:gson:.*"))
Expand Down
3 changes: 3 additions & 0 deletions spigot/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ tasks {
manifest {
attributes["paperweight-mappings-namespace"] = "mojang"
}

relocate("net.kyori.adventure.text.serializer",
"io.github.retrooper.packetevents.adventure.serializer")
}

// 1.8.8 - 1.16.5 = Java 8
Expand Down
6 changes: 6 additions & 0 deletions velocity/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,10 @@ tasks {
languageVersion = JavaLanguageVersion.of(21)
}
}

shadowJar {
sequenceOf("gson", "json", "legacy").forEach {
relocate("net.kyori.adventure.text.serializer.$it", "io.github.retrooper.packetevents.adventure.serializer.$it")
}
}
}

0 comments on commit ee20abd

Please sign in to comment.