diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index c0ad9c30..07f49bf1 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -14,10 +14,10 @@ jobs: persist-credentials: false - name: Set up Gradle uses: gradle/actions/setup-gradle@v4 - - name: Set up JDK 17 + - name: Set up JDK 21 uses: actions/setup-java@v4 with: - java-version: 17 - distribution: 'temurin' + java-version: 21 + distribution: 'zulu' - name: Build with Gradle run: ./gradlew build diff --git a/api/src/main/java/com/velocitypowered/api/network/ProtocolVersion.java b/api/src/main/java/com/velocitypowered/api/network/ProtocolVersion.java index 5715b021..ada18673 100644 --- a/api/src/main/java/com/velocitypowered/api/network/ProtocolVersion.java +++ b/api/src/main/java/com/velocitypowered/api/network/ProtocolVersion.java @@ -91,7 +91,8 @@ public enum ProtocolVersion implements Ordered { MINECRAFT_1_21_2(768, "1.21.2", "1.21.3"), MINECRAFT_1_21_4(769, "1.21.4"), MINECRAFT_1_21_5(770, "1.21.5"), - MINECRAFT_1_21_6(771, "1.21.6"); + MINECRAFT_1_21_6(771, "1.21.6"), + MINECRAFT_1_21_7(772, "1.21.7"); private static final int SNAPSHOT_BIT = 30; diff --git a/build-logic/src/main/kotlin/velocity-init-manifest.gradle.kts b/build-logic/src/main/kotlin/velocity-init-manifest.gradle.kts index 1901430f..e38ef34d 100644 --- a/build-logic/src/main/kotlin/velocity-init-manifest.gradle.kts +++ b/build-logic/src/main/kotlin/velocity-init-manifest.gradle.kts @@ -2,8 +2,15 @@ import org.gradle.jvm.tasks.Jar import org.gradle.kotlin.dsl.withType import java.io.ByteArrayOutputStream +// This interface is needed as a workaround to get an instance of ExecOperations +interface Injected { + @get:Inject + val execOps: ExecOperations +} + val currentShortRevision = ByteArrayOutputStream().use { - exec { + val execOps = objects.newInstance().execOps + execOps.exec { executable = "git" args = listOf("rev-parse", "HEAD") standardOutput = it diff --git a/build-logic/src/main/kotlin/velocity-publish.gradle.kts b/build-logic/src/main/kotlin/velocity-publish.gradle.kts index 51de5c67..a7cc744a 100644 --- a/build-logic/src/main/kotlin/velocity-publish.gradle.kts +++ b/build-logic/src/main/kotlin/velocity-publish.gradle.kts @@ -8,7 +8,7 @@ extensions.configure { maven { credentials(PasswordCredentials::class.java) - name = "paper" + name = if (version.toString().endsWith("SNAPSHOT")) "paperSnapshots" else "paper" // "paper" is seemingly not defined val base = "https://repo.papermc.io/repository/maven" val releasesRepoUrl = "$base-releases/" val snapshotsRepoUrl = "$base-snapshots/" diff --git a/build.gradle.kts b/build.gradle.kts index 9e862dad..a761de5f 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -20,11 +20,11 @@ subprojects { testImplementation(rootProject.libs.junit) } - tasks { - test { - useJUnitPlatform() - reports { - junitXml.required.set(true) + testing.suites.named("test") { + useJUnitJupiter() + targets.all { + testTask.configure { + reports.junitXml.required = true } } } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 0f9ed2a5..fb1e863f 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -6,13 +6,14 @@ log4j = "2.24.3" netty = "4.2.1.Final" [plugins] +fill = "io.papermc.fill.gradle:1.0.3" indra-publishing = "net.kyori.indra.publishing:2.0.6" -shadow = "io.github.goooler.shadow:8.1.5" +shadow = "com.gradleup.shadow:8.3.6" spotless = "com.diffplug.spotless:6.25.0" [libraries] -adventure-bom = "net.kyori:adventure-bom:4.21.0" -adventure-text-serializer-json-legacy-impl = "net.kyori:adventure-text-serializer-json-legacy-impl:4.21.0" +adventure-bom = "net.kyori:adventure-bom:4.23.0" +adventure-text-serializer-json-legacy-impl = "net.kyori:adventure-text-serializer-json-legacy-impl:4.23.0" adventure-facet = "net.kyori:adventure-platform-facet:4.3.4" asm = "org.ow2.asm:asm:9.8" auto-service = "com.google.auto.service:auto-service:1.0.1" diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index e2847c82..ff23a68d 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.2-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/proxy/build.gradle.kts b/proxy/build.gradle.kts index f345f232..1559f5fd 100644 --- a/proxy/build.gradle.kts +++ b/proxy/build.gradle.kts @@ -1,9 +1,11 @@ import com.github.jengelman.gradle.plugins.shadow.transformers.Log4j2PluginsCacheFileTransformer +import io.papermc.fill.model.BuildChannel plugins { application id("velocity-init-manifest") alias(libs.plugins.shadow) + alias(libs.plugins.fill) } application { @@ -108,6 +110,24 @@ tasks { } } +val projectVersion = version as String +fill { + project("velocity") + + build { + channel = BuildChannel.STABLE + versionFamily("3.0.0") + version(projectVersion) + + downloads { + register("server:default") { + file = tasks.shadowJar.flatMap { it.archiveFile } + nameResolver.set { project, _, version, build -> "$project-$version-$build.jar" } + } + } + } +} + dependencies { implementation(project(":velocity-api")) implementation(project(":velocity-native")) diff --git a/proxy/src/main/java/com/velocitypowered/proxy/protocol/ProtocolUtils.java b/proxy/src/main/java/com/velocitypowered/proxy/protocol/ProtocolUtils.java index 3fa52378..a90ee9dc 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/protocol/ProtocolUtils.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/protocol/ProtocolUtils.java @@ -69,6 +69,8 @@ public enum ProtocolUtils { .value(JSONOptions.EMIT_COMPACT_TEXT_COMPONENT, Boolean.FALSE) .value(JSONOptions.EMIT_HOVER_SHOW_ENTITY_ID_AS_INT_ARRAY, Boolean.FALSE) .value(JSONOptions.VALIDATE_STRICT_EVENTS, Boolean.FALSE) + // before 1.21.5 + .value(JSONOptions.EMIT_CHANGE_PAGE_CLICK_EVENT_PAGE_AS_STRING, Boolean.TRUE) .build() ) .build(); @@ -86,6 +88,8 @@ public enum ProtocolUtils { .value(JSONOptions.EMIT_COMPACT_TEXT_COMPONENT, Boolean.FALSE) .value(JSONOptions.EMIT_HOVER_SHOW_ENTITY_ID_AS_INT_ARRAY, Boolean.FALSE) .value(JSONOptions.VALIDATE_STRICT_EVENTS, Boolean.FALSE) + // before 1.21.5 + .value(JSONOptions.EMIT_CHANGE_PAGE_CLICK_EVENT_PAGE_AS_STRING, Boolean.TRUE) .build() ) .build(); @@ -103,6 +107,8 @@ public enum ProtocolUtils { .value(JSONOptions.EMIT_COMPACT_TEXT_COMPONENT, Boolean.TRUE) .value(JSONOptions.EMIT_HOVER_SHOW_ENTITY_ID_AS_INT_ARRAY, Boolean.TRUE) .value(JSONOptions.VALIDATE_STRICT_EVENTS, Boolean.TRUE) + // before 1.21.5 + .value(JSONOptions.EMIT_CHANGE_PAGE_CLICK_EVENT_PAGE_AS_STRING, Boolean.TRUE) .build() ) .build(); @@ -121,6 +127,7 @@ public enum ProtocolUtils { // after 1.21.5 .value(JSONOptions.EMIT_HOVER_SHOW_ENTITY_KEY_AS_TYPE_AND_UUID_AS_ID, Boolean.FALSE) .value(JSONOptions.VALIDATE_STRICT_EVENTS, Boolean.TRUE) + .value(JSONOptions.EMIT_CHANGE_PAGE_CLICK_EVENT_PAGE_AS_STRING, Boolean.FALSE) .build() ) .build(); diff --git a/proxy/src/main/resources/com/velocitypowered/proxy/l10n/messages_bg_BG.properties b/proxy/src/main/resources/com/velocitypowered/proxy/l10n/messages_bg_BG.properties index c50dc10a..b5a12e46 100644 --- a/proxy/src/main/resources/com/velocitypowered/proxy/l10n/messages_bg_BG.properties +++ b/proxy/src/main/resources/com/velocitypowered/proxy/l10n/messages_bg_BG.properties @@ -35,7 +35,7 @@ velocity.command.generic-error=Възникна грешка при изпълн velocity.command.command-does-not-exist=Тази команда не съществува. velocity.command.players-only=Само играчи могат да изпълняват тази команда. velocity.command.server-does-not-exist=Сървър с името {0} не съществува. -velocity.command.player-not-found=Този играч {0} не съществува. +velocity.command.player-not-found=Играч с името {0} не съществува. velocity.command.server-current-server=В момента сте свързан към {0}. velocity.command.server-too-many=Има прекалено много регистрирани сървъри. Използвайте TAB, за да видите всички налични сървъри. velocity.command.server-available=Налични сървъри\: diff --git a/proxy/src/main/resources/com/velocitypowered/proxy/l10n/messages_es_ES.properties b/proxy/src/main/resources/com/velocitypowered/proxy/l10n/messages_es_ES.properties index 910e54cf..a99efb44 100644 --- a/proxy/src/main/resources/com/velocitypowered/proxy/l10n/messages_es_ES.properties +++ b/proxy/src/main/resources/com/velocitypowered/proxy/l10n/messages_es_ES.properties @@ -29,7 +29,7 @@ velocity.error.modern-forwarding-needs-new-client=Este servidor solo es compatib velocity.error.modern-forwarding-failed=El servidor no ha enviado una solicitud de reenvío al proxy. Asegúrate de que tu servidor está configurado para usar el método de reenvío de Velocity. velocity.error.moved-to-new-server=Has sido echado de {0}\: {1} velocity.error.no-available-servers=No hay servidores disponibles a los que conectarte. Inténtalo de nuevo más tarde o contacta con un administrador. -velocity.error.illegal-chat-characters=Illegal characters in chat +velocity.error.illegal-chat-characters=Caracteres no válidos en el chat # Commands velocity.command.generic-error=Se ha producido un error al ejecutar este comando. velocity.command.command-does-not-exist=Este comando no existe. @@ -60,6 +60,6 @@ velocity.command.dump-success=Se ha creado un informe anónimo que contiene info velocity.command.dump-will-expire=Este enlace caducará en unos días. velocity.command.dump-server-error=Se ha producido un error en los servidores de Velocity y la subida no se ha podido completar. Notifica al equipo de Velocity sobre este problema y proporciona los detalles sobre este error disponibles en el archivo de registro o la consola de tu servidor Velocity. velocity.command.dump-offline=Causa probable\: la configuración DNS del sistema no es válida o no hay conexión a internet -velocity.command.send-usage=/send +velocity.command.send-usage=/send # Kick -velocity.kick.shutdown=Proxy shutting down. \ No newline at end of file +velocity.kick.shutdown=El proxy se ha apagado. \ No newline at end of file