mirror of
https://github.com/ViaVersion/VIAaaS.git
synced 2025-02-27 03:32:54 +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")
|
extra.set("archivesBaseName", "VIAaaS")
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
|
//mavenLocal()
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
maven("https://oss.sonatype.org/content/repositories/snapshots")
|
maven("https://oss.sonatype.org/content/repositories/snapshots")
|
||||||
maven("https://repo.viaversion.com/")
|
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
|
// 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 {
|
fun parseUndashedId(string: String): UUID {
|
||||||
Preconditions.checkArgument(string.length == 32, "Length is incorrect")
|
Preconditions.checkArgument(string.length == 32, "Length is incorrect")
|
||||||
return UUID(
|
return UUID(
|
||||||
|
@ -42,7 +42,7 @@ class HandshakeState : MinecraftConnectionState {
|
|||||||
throw StacklessException("Rate-limited")
|
throw StacklessException("Rate-limited")
|
||||||
}
|
}
|
||||||
val virtualPort = packet.port
|
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 virtualHostNoExtra = packet.address.substringBefore(0.toChar())
|
||||||
|
|
||||||
val parsed = VIAaaSConfig.hostName.map {
|
val parsed = VIAaaSConfig.hostName.map {
|
||||||
|
@ -8,6 +8,6 @@ object AspirinVersionProvider : BaseVersionProvider() {
|
|||||||
override fun getClosestServerProtocol(connection: UserConnection): Int {
|
override fun getClosestServerProtocol(connection: UserConnection): Int {
|
||||||
val ver = connection.channel!!.pipeline().get(MinecraftHandler::class.java).data.viaBackServerVer
|
val ver = connection.channel!!.pipeline().get(MinecraftHandler::class.java).data.viaBackServerVer
|
||||||
if (ver != null) return ver
|
if (ver != null) return ver
|
||||||
return super.getServerProtocol(connection)
|
return super.getClosestServerProtocol(connection)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user