diff options
| author | Petr Ilin <hevav@hevav.dev> | 2023-01-16 07:26:09 +0300 |
|---|---|---|
| committer | Petr Ilin <hevav@hevav.dev> | 2023-01-16 07:28:15 +0300 |
| commit | 0e7e93353073dc36bf550de7cb352dbdd5b447de (patch) | |
| tree | 8c0b3b7d9ff867a3d353a7830343351d2824b484 /src/main/java/net/elytrium/limboauth/command | |
| parent | a635de80d46eb3f967c30091283e95819d404b84 (diff) | |
| download | LimboAuth-0e7e93353073dc36bf550de7cb352dbdd5b447de.tar.gz LimboAuth-0e7e93353073dc36bf550de7cb352dbdd5b447de.tar.bz2 LimboAuth-0e7e93353073dc36bf550de7cb352dbdd5b447de.zip | |
1.1.1 release: Client Mod support, RegisteredPlayer refactor
Diffstat (limited to 'src/main/java/net/elytrium/limboauth/command')
| -rw-r--r-- | src/main/java/net/elytrium/limboauth/command/ChangePasswordCommand.java | 2 | ||||
| -rw-r--r-- | src/main/java/net/elytrium/limboauth/command/ForceChangePasswordCommand.java | 3 |
2 files changed, 2 insertions, 3 deletions
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<RegisteredPlayer, String> 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<RegisteredPlayer, String> 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) |
