update kotlin

This commit is contained in:
creeper123123321 2021-05-06 19:16:02 -03:00
parent f7e16a16df
commit 6b23a6e62f
4 changed files with 9 additions and 9 deletions

View File

@ -3,9 +3,9 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins { plugins {
`java-library` `java-library`
application application
kotlin("jvm") version "1.4.32" kotlin("jvm") version "1.5.0"
id("maven-publish") 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.github.ben-manes.versions") version "0.38.0"
id("com.palantir.git-version") version "0.12.3" 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.jline:jline-terminal-jansi:3.19.0")
implementation("org.apache.commons:commons-compress:1.20") implementation("org.apache.commons:commons-compress:1.20")
val ktorVersion = "1.5.3" val ktorVersion = "1.5.4"
implementation(kotlin("stdlib-jdk8")) implementation(kotlin("stdlib-jdk8"))
implementation("io.ktor:ktor-network-tls-certificates:$ktorVersion") implementation("io.ktor:ktor-network-tls-certificates:$ktorVersion")
implementation("io.ktor:ktor-server-netty:$ktorVersion") implementation("io.ktor:ktor-server-netty:$ktorVersion")

View File

@ -48,7 +48,7 @@ class VIAaaSAddress {
}?.toString() }?.toString()
if (option != null) { if (option != null) {
val arg = part.substring(2) val arg = part.substring(2)
when (option.toLowerCase(Locale.ROOT)) { when (option.lowercase()) {
"p" -> port = arg.toInt() "p" -> port = arg.toInt()
"o" -> online = when { "o" -> online = when {
arg.startsWith("t", ignoreCase = true) -> true arg.startsWith("t", ignoreCase = true) -> true
@ -78,4 +78,4 @@ class VIAaaSAddress {
protocol = null protocol = null
} }
} }
} }

View File

@ -39,7 +39,7 @@ object VIAaaSConsole : SimpleTerminalConsole(), ViaCommandSender {
candidates.addAll(commands.keys.filter { it.startsWith(alias, ignoreCase = true) } candidates.addAll(commands.keys.filter { it.startsWith(alias, ignoreCase = true) }
.map { Candidate(it) }) .map { Candidate(it) })
} else { } else {
val command = commands[alias.toLowerCase()] val command = commands[alias.lowercase()]
if (command != null) { if (command != null) {
candidates.addAll(command.suggest(this, alias, args).map(::Candidate)) candidates.addAll(command.suggest(this, alias, args).map(::Candidate))
} }
@ -53,7 +53,7 @@ object VIAaaSConsole : SimpleTerminalConsole(), ViaCommandSender {
override fun runCommand(commandLine: String) { override fun runCommand(commandLine: String) {
val cmd = commandLine.split(" ") val cmd = commandLine.split(" ")
try { try {
val alias = cmd[0].toLowerCase() val alias = cmd[0].lowercase()
val args = cmd.subList(1, cmd.size) val args = cmd.subList(1, cmd.size)
val command = commands[alias] val command = commands[alias]
if (command == null) { if (command == null) {
@ -77,4 +77,4 @@ object VIAaaSConsole : SimpleTerminalConsole(), ViaCommandSender {
override fun hasPermission(p0: String): Boolean = true override fun hasPermission(p0: String): Boolean = true
override fun getUUID(): UUID = UUID.fromString(name) override fun getUUID(): UUID = UUID.fromString(name)
override fun getName(): String = "VIAaaS Console" override fun getName(): String = "VIAaaS Console"
} }

View File

@ -105,4 +105,4 @@ class Chunk1_8to1_7_6_10(
blockBiomeArray = input.readByteArray(256) blockBiomeArray = input.readByteArray(256)
} }
} }
} }