fix deprecated/experimental warn

This commit is contained in:
creeper123123321 2021-04-17 09:09:27 -03:00
parent b84d0c98c0
commit 8130cb8ede
4 changed files with 4 additions and 2 deletions

View File

@ -37,6 +37,7 @@ version = "0.2.2-SNAPSHOT+" + try {
extra.set("archivesBaseName", "VIAaaS")
repositories {
//mavenLocal()
mavenCentral()
maven("https://oss.sonatype.org/content/repositories/snapshots")
maven("https://repo.viaversion.com/")

View File

@ -72,6 +72,7 @@ fun mcCfb8(key: ByteArray, mode: Int): Cipher {
}
// https://github.com/VelocityPowered/Velocity/blob/6467335f74a7d1617512a55cc9acef5e109b51ac/api/src/main/java/com/velocitypowered/api/util/UuidUtils.java
@OptIn(ExperimentalUnsignedTypes::class)
fun parseUndashedId(string: String): UUID {
Preconditions.checkArgument(string.length == 32, "Length is incorrect")
return UUID(

View File

@ -42,7 +42,7 @@ class HandshakeState : MinecraftConnectionState {
throw StacklessException("Rate-limited")
}
val virtualPort = packet.port
val extraData = packet.address.substringAfter(0.toChar(), missingDelimiterValue = "") // todo
val extraData = packet.address.substringAfter(0.toChar(), missingDelimiterValue = "").ifEmpty { null } // todo
val virtualHostNoExtra = packet.address.substringBefore(0.toChar())
val parsed = VIAaaSConfig.hostName.map {

View File

@ -8,6 +8,6 @@ object AspirinVersionProvider : BaseVersionProvider() {
override fun getClosestServerProtocol(connection: UserConnection): Int {
val ver = connection.channel!!.pipeline().get(MinecraftHandler::class.java).data.viaBackServerVer
if (ver != null) return ver
return super.getServerProtocol(connection)
return super.getClosestServerProtocol(connection)
}
}