fix: fixed not being able to join worlds in multiplayer and singleplayer

Signed-off-by: moonleay <contact@moonleay.net>
This commit is contained in:
moonleay 2024-05-01 19:55:53 +02:00
parent 8b7e576d3d
commit 8bcbcc021b
Signed by: moonleay
GPG key ID: 82667543CCD715FB

View file

@ -70,11 +70,17 @@ object ClientEditor {
DISABLED_MODIFIERS_STORAGE.clear()
onUpdated(shouldUpdateServer)
if (!shouldUpdateServer)
if (!shouldUpdateServer) {
val player = MinecraftClient.getInstance().player
if (player == null) {
println("Player is null!")
return
}
ServerEditorManager.updateEditorState(
MinecraftClient.getInstance().player!!.uuid,
this.getClientState()
)
}
}
}