diff --git a/build.gradle b/build.gradle index 7a58283..06d32f6 100644 --- a/build.gradle +++ b/build.gradle @@ -4,10 +4,11 @@ plugins { id("com.github.spotbugs").version("6.0.12") id("org.cadixdev.licenser").version("0.6.1") id("com.gradleup.shadow").version("8.3.6") + id("xyz.jpenilla.run-velocity") version "2.3.1" } setGroup("net.elytrium") -setVersion("1.1.7") +setVersion("1.1.8") compileJava { getOptions().setEncoding("UTF-8") @@ -47,6 +48,17 @@ shadowJar { relocate("net.elytrium.commons.kyori", "net.elytrium.limboapi.thirdparty.commons.kyori") } +tasks { + runVelocity { + velocityVersion("3.4.0-SNAPSHOT") + + downloadPlugins { + github("Elytrium", "LimboAPI", "dev-build", "limboapi-1.1.27-SNAPSHOT.jar") + + } + } +} + license { setHeader(file("HEADER.txt")) } @@ -67,7 +79,7 @@ spotbugsMain { reports { html { getRequired().set(true) - getOutputLocation().set(file("${this.getBuildDir()}/reports/spotbugs/main/spotbugs.html")) + getOutputLocation().set(file("${this.getRootDir()}/${this.DEFAULT_BUILD_DIR_NAME}/reports/spotbugs/main/spotbugs.html")) setStylesheet("fancy-hist.xsl") } } @@ -88,17 +100,23 @@ sourceSets.main.getJava().srcDir( assemble.dependsOn(shadowJar) -String getCurrentShortRevision() { - OutputStream outputStream = new ByteArrayOutputStream() - exec { - if (System.getProperty("os.name").toLowerCase().contains("win")) { - commandLine("cmd", "/c", "git rev-parse --short HEAD") - } else { - commandLine("bash", "-c", "git rev-parse --short HEAD") - } +static String getCurrentShortRevision() { + def command = System.getProperty("os.name").toLowerCase().contains("win") + ? ["cmd", "/c", "git rev-parse --short HEAD"] + : ["bash", "-c", "git rev-parse --short HEAD"] + + def process = new ProcessBuilder(command) + .redirectErrorStream(true) + .start() + + def output = process.inputStream.withStream { + it.readLines().join("\n").trim() + } - setStandardOutput(outputStream) + process.waitFor() + if (process.exitValue() != 0) { + throw new GradleException("Failed to get git revision: ${output}") } - return outputStream.toString().trim() + return output } diff --git a/gradle.properties b/gradle.properties index 1ca6632..4359a1f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -limboapiVersion=1.1.26 +limboapiVersion=1.1.27 velocityVersion=3.4.0-SNAPSHOT -nettyVersion=4.1.114.Final -serializerVersion=1.1.1 \ No newline at end of file +nettyVersion=4.1.118.Final +serializerVersion=1.1.1 diff --git a/src/main/java/net/elytrium/limboreconnect/LimboReconnect.java b/src/main/java/net/elytrium/limboreconnect/LimboReconnect.java index 6844267..e50d143 100644 --- a/src/main/java/net/elytrium/limboreconnect/LimboReconnect.java +++ b/src/main/java/net/elytrium/limboreconnect/LimboReconnect.java @@ -169,6 +169,7 @@ public void reload() { new PacketMapping(0x68, ProtocolVersion.MINECRAFT_1_20_5, true), new PacketMapping(0x6f, ProtocolVersion.MINECRAFT_1_21_2, true), new PacketMapping(0x6e, ProtocolVersion.MINECRAFT_1_21_5, true), + new PacketMapping(0x6e, ProtocolVersion.MINECRAFT_1_21_7, true) }); this.offlineTitles.clear();