From 0e7e93353073dc36bf550de7cb352dbdd5b447de Mon Sep 17 00:00:00 2001 From: Petr Ilin Date: Mon, 16 Jan 2023 07:26:09 +0300 Subject: 1.1.1 release: Client Mod support, RegisteredPlayer refactor --- .../java/net/elytrium/limboauth/command/ChangePasswordCommand.java | 2 +- .../net/elytrium/limboauth/command/ForceChangePasswordCommand.java | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'src/main/java/net/elytrium/limboauth/command') diff --git a/src/main/java/net/elytrium/limboauth/command/ChangePasswordCommand.java b/src/main/java/net/elytrium/limboauth/command/ChangePasswordCommand.java index f22a96f..2fea6f5 100644 --- a/src/main/java/net/elytrium/limboauth/command/ChangePasswordCommand.java +++ b/src/main/java/net/elytrium/limboauth/command/ChangePasswordCommand.java @@ -91,7 +91,7 @@ public class ChangePasswordCommand implements SimpleCommand { try { UpdateBuilder updateBuilder = this.playerDao.updateBuilder(); updateBuilder.where().eq(RegisteredPlayer.NICKNAME_FIELD, username); - updateBuilder.updateColumnValue(RegisteredPlayer.HASH_FIELD, AuthSessionHandler.genHash(needOldPass ? args[1] : args[0])); + updateBuilder.updateColumnValue(RegisteredPlayer.HASH_FIELD, RegisteredPlayer.genHash(needOldPass ? args[1] : args[0])); updateBuilder.update(); source.sendMessage(this.successful); diff --git a/src/main/java/net/elytrium/limboauth/command/ForceChangePasswordCommand.java b/src/main/java/net/elytrium/limboauth/command/ForceChangePasswordCommand.java index f497c3c..67d9c67 100644 --- a/src/main/java/net/elytrium/limboauth/command/ForceChangePasswordCommand.java +++ b/src/main/java/net/elytrium/limboauth/command/ForceChangePasswordCommand.java @@ -30,7 +30,6 @@ import net.elytrium.commons.kyori.serialization.Serializer; import net.elytrium.commons.velocity.commands.SuggestUtils; import net.elytrium.limboauth.LimboAuth; import net.elytrium.limboauth.Settings; -import net.elytrium.limboauth.handler.AuthSessionHandler; import net.elytrium.limboauth.model.RegisteredPlayer; import net.elytrium.limboauth.model.SQLRuntimeException; import net.kyori.adventure.text.Component; @@ -73,7 +72,7 @@ public class ForceChangePasswordCommand implements SimpleCommand { try { UpdateBuilder updateBuilder = this.playerDao.updateBuilder(); updateBuilder.where().eq(RegisteredPlayer.LOWERCASE_NICKNAME_FIELD, nickname.toLowerCase(Locale.ROOT)); - updateBuilder.updateColumnValue(RegisteredPlayer.HASH_FIELD, AuthSessionHandler.genHash(newPassword)); + updateBuilder.updateColumnValue(RegisteredPlayer.HASH_FIELD, RegisteredPlayer.genHash(newPassword)); updateBuilder.update(); this.server.getPlayer(nickname) -- cgit