From b5dca310790e3408dfd3f47b256a08fbb507bcd5 Mon Sep 17 00:00:00 2001 From: ruViolence <78062896+ruViolence@users.noreply.github.com> Date: Fri, 26 Jan 2024 14:49:27 +0800 Subject: [PATCH] Unregister "/2fa" command only if enabled --- src/main/java/net/elytrium/limboauth/LimboAuth.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/net/elytrium/limboauth/LimboAuth.java b/src/main/java/net/elytrium/limboauth/LimboAuth.java index 1e214aa3..82c21c37 100644 --- a/src/main/java/net/elytrium/limboauth/LimboAuth.java +++ b/src/main/java/net/elytrium/limboauth/LimboAuth.java @@ -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"); @@ -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");