update via, show username in not listened error

This commit is contained in:
creeper123123321 2021-09-16 16:19:55 -03:00
parent 47eafd9e5d
commit 0d5340ace6
3 changed files with 5 additions and 3 deletions

View File

@ -60,8 +60,8 @@ dependencies {
implementation(kotlin("stdlib-jdk8"))
implementation(kotlin("reflect"))
val vvVer = "4.0.2-SNAPSHOT"
val vbVer = "4.0.2-SNAPSHOT"
val vvVer = "4.1.0-21w37a-SNAPSHOT"
val vbVer = "4.1.0-21w37a-SNAPSHOT"
val vrVer = "6484c61"
implementation("com.viaversion:viaversion:$vvVer") { isTransitive = false }
implementation("com.viaversion:viabackwards:$vbVer") { isTransitive = false }

View File

@ -143,6 +143,7 @@ class LoginState : ConnectionState {
val pluginReauthed = reauthMessage(handler, backName!!, backHash).await()
if (!pluginReauthed) {
AspirinServer.viaWebServer.requestSessionJoin(
frontName,
playerId,
backName!!,
backHash,

View File

@ -82,12 +82,13 @@ class WebDashboardServer {
.build<String, CompletableFuture<Unit>>(CacheLoader.from { _ -> CompletableFuture() })
suspend fun requestSessionJoin(
frontName: String,
id: UUID, name: String, hash: String,
address: SocketAddress, backAddress: SocketAddress
): CompletableFuture<Unit> {
val future = sessionHashCallbacks[hash]
if (!listeners.containsKey(id)) {
future.completeExceptionally(StacklessException("UUID $id isn't listened. Use web auth."))
future.completeExceptionally(StacklessException("UUID $id ($frontName) isn't listened. Go to web auth."))
} else {
CoroutineScope(coroutineContext).apply {
launch(Dispatchers.IO) {