diff --git a/src/main/kotlin/com/github/encryptsl/lite/eco/common/database/models/DatabaseEcoModel.kt b/src/main/kotlin/com/github/encryptsl/lite/eco/common/database/models/DatabaseEcoModel.kt index 8bb5dd2..837137a 100644 --- a/src/main/kotlin/com/github/encryptsl/lite/eco/common/database/models/DatabaseEcoModel.kt +++ b/src/main/kotlin/com/github/encryptsl/lite/eco/common/database/models/DatabaseEcoModel.kt @@ -38,6 +38,7 @@ class DatabaseEcoModel : PlayerSQL { try { val table = Account(currency) table.update ({ table.uuid eq uuid }) { + it[table.username] = username } } catch (e : ExposedSQLException) { LiteEco.instance.logger.severe(e.message ?: e.localizedMessage) diff --git a/src/main/kotlin/com/github/encryptsl/lite/eco/listeners/AccountManageListener.kt b/src/main/kotlin/com/github/encryptsl/lite/eco/listeners/AccountManageListener.kt index ef15f3f..3c50201 100644 --- a/src/main/kotlin/com/github/encryptsl/lite/eco/listeners/AccountManageListener.kt +++ b/src/main/kotlin/com/github/encryptsl/lite/eco/listeners/AccountManageListener.kt @@ -23,7 +23,6 @@ class AccountManageListener(private val liteEco: LiteEco) : Listener { for (currency in liteEco.currencyImpl.getCurrenciesKeys()) { liteEco.databaseEcoModel.getUserByUUID(player.uniqueId, currency).thenApply { liteEco.databaseEcoModel.updatePlayerName(it.uuid, player.name.toString(), currency) - return@thenApply it }.thenAccept { liteEco.api.cacheAccount(player, currency, it.money)