Skip to content

Commit

Permalink
Unregister "/2fa" command only if enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
ruViolence committed Jan 26, 2024
1 parent 2c60de7 commit b5dca31
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/net/elytrium/limboauth/LimboAuth.java
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,6 @@ public void reload() {
manager.unregister("changepassword");
manager.unregister("forcechangepassword");
manager.unregister("destroysession");
manager.unregister("2fa");
manager.unregister("limboauth");

manager.register("unregister", new UnregisterCommand(this, this.playerDao), "unreg");
Expand All @@ -354,6 +353,7 @@ public void reload() {
manager.register("forcechangepassword", new ForceChangePasswordCommand(this, this.server, this.playerDao), "forcechangepass", "fcp");
manager.register("destroysession", new DestroySessionCommand(this), "logout");
if (Settings.IMP.MAIN.ENABLE_TOTP) {
manager.unregister("2fa");
manager.register("2fa", new TotpCommand(this.playerDao), "totp");
}
manager.register("limboauth", new LimboAuthCommand(this), "la", "auth", "lauth");
Expand Down

0 comments on commit b5dca31

Please sign in to comment.