getClosestServerProtocol

This commit is contained in:
creeper123123321 2021-04-16 19:19:03 -03:00 committed by GitHub
parent ce9811da24
commit b84d0c98c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,9 +5,9 @@ import us.myles.ViaVersion.api.data.UserConnection
import us.myles.ViaVersion.protocols.base.BaseVersionProvider
object AspirinVersionProvider : BaseVersionProvider() {
override fun getServerProtocol(connection: UserConnection): Int {
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)
}
}
}