mirror of
https://github.com/ViaVersion/VIAaaS.git
synced 2024-11-28 13:05:16 +01:00
fix deprecated/experimental warn
This commit is contained in:
parent
b84d0c98c0
commit
8130cb8ede
@ -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/")
|
||||
|
@ -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(
|
||||
|
@ -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 {
|
||||
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user