From 6b23a6e62f2d184c677f75880d6a194325e7c534 Mon Sep 17 00:00:00 2001 From: creeper123123321 <7974274+creeper123123321@users.noreply.github.com> Date: Thu, 6 May 2021 19:16:02 -0300 Subject: [PATCH] update kotlin --- build.gradle.kts | 6 +++--- src/main/kotlin/com/viaversion/aas/VIAaaSAddress.kt | 4 ++-- src/main/kotlin/com/viaversion/aas/command/VIAaaSConsole.kt | 6 +++--- .../aas/protocol/id47toid5/chunks/Chunk1_8to1_7_6_10.kt | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 410ac28..3d29a9a 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -3,9 +3,9 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { `java-library` application - kotlin("jvm") version "1.4.32" + kotlin("jvm") version "1.5.0" id("maven-publish") - id("com.github.johnrengelman.shadow") version "6.1.0" + id("com.github.johnrengelman.shadow") version "7.0.0" id("com.github.ben-manes.versions") version "0.38.0" id("com.palantir.git-version") version "0.12.3" } @@ -65,7 +65,7 @@ dependencies { implementation("org.jline:jline-terminal-jansi:3.19.0") implementation("org.apache.commons:commons-compress:1.20") - val ktorVersion = "1.5.3" + val ktorVersion = "1.5.4" implementation(kotlin("stdlib-jdk8")) implementation("io.ktor:ktor-network-tls-certificates:$ktorVersion") implementation("io.ktor:ktor-server-netty:$ktorVersion") diff --git a/src/main/kotlin/com/viaversion/aas/VIAaaSAddress.kt b/src/main/kotlin/com/viaversion/aas/VIAaaSAddress.kt index 747dfd8..9fd28e7 100644 --- a/src/main/kotlin/com/viaversion/aas/VIAaaSAddress.kt +++ b/src/main/kotlin/com/viaversion/aas/VIAaaSAddress.kt @@ -48,7 +48,7 @@ class VIAaaSAddress { }?.toString() if (option != null) { val arg = part.substring(2) - when (option.toLowerCase(Locale.ROOT)) { + when (option.lowercase()) { "p" -> port = arg.toInt() "o" -> online = when { arg.startsWith("t", ignoreCase = true) -> true @@ -78,4 +78,4 @@ class VIAaaSAddress { protocol = null } } -} \ No newline at end of file +} diff --git a/src/main/kotlin/com/viaversion/aas/command/VIAaaSConsole.kt b/src/main/kotlin/com/viaversion/aas/command/VIAaaSConsole.kt index 7bcc48f..fc6ccec 100644 --- a/src/main/kotlin/com/viaversion/aas/command/VIAaaSConsole.kt +++ b/src/main/kotlin/com/viaversion/aas/command/VIAaaSConsole.kt @@ -39,7 +39,7 @@ object VIAaaSConsole : SimpleTerminalConsole(), ViaCommandSender { candidates.addAll(commands.keys.filter { it.startsWith(alias, ignoreCase = true) } .map { Candidate(it) }) } else { - val command = commands[alias.toLowerCase()] + val command = commands[alias.lowercase()] if (command != null) { candidates.addAll(command.suggest(this, alias, args).map(::Candidate)) } @@ -53,7 +53,7 @@ object VIAaaSConsole : SimpleTerminalConsole(), ViaCommandSender { override fun runCommand(commandLine: String) { val cmd = commandLine.split(" ") try { - val alias = cmd[0].toLowerCase() + val alias = cmd[0].lowercase() val args = cmd.subList(1, cmd.size) val command = commands[alias] if (command == null) { @@ -77,4 +77,4 @@ object VIAaaSConsole : SimpleTerminalConsole(), ViaCommandSender { override fun hasPermission(p0: String): Boolean = true override fun getUUID(): UUID = UUID.fromString(name) override fun getName(): String = "VIAaaS Console" -} \ No newline at end of file +} diff --git a/src/main/kotlin/com/viaversion/aas/protocol/id47toid5/chunks/Chunk1_8to1_7_6_10.kt b/src/main/kotlin/com/viaversion/aas/protocol/id47toid5/chunks/Chunk1_8to1_7_6_10.kt index fda769a..a54afed 100644 --- a/src/main/kotlin/com/viaversion/aas/protocol/id47toid5/chunks/Chunk1_8to1_7_6_10.kt +++ b/src/main/kotlin/com/viaversion/aas/protocol/id47toid5/chunks/Chunk1_8to1_7_6_10.kt @@ -105,4 +105,4 @@ class Chunk1_8to1_7_6_10( blockBiomeArray = input.readByteArray(256) } } -} \ No newline at end of file +}