diff options
author | AVuTuVA <66278054+AVuTuVA@users.noreply.github.com> | 2023-01-22 13:15:42 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-22 13:15:42 +0300 |
commit | 4f688dce7f7ab9d66ea6136351a5b59fe17a2236 (patch) | |
tree | 091600fc85fd9101489d83616205b6c3276b4db8 | |
parent | 0cacf83f84c88d018670c508a6d886166bd8af83 (diff) | |
download | LimboAuth-4f688dce7f7ab9d66ea6136351a5b59fe17a2236.tar.gz LimboAuth-4f688dce7f7ab9d66ea6136351a5b59fe17a2236.tar.bz2 LimboAuth-4f688dce7f7ab9d66ea6136351a5b59fe17a2236.zip |
Don't register command if totp is disabled (#74)
-rw-r--r-- | VERSION | 2 | ||||
-rw-r--r-- | build.gradle | 2 | ||||
-rw-r--r-- | src/main/java/net/elytrium/limboauth/LimboAuth.java | 7 |
3 files changed, 7 insertions, 4 deletions
@@ -1 +1 @@ -1.1.4 +1.1.5 diff --git a/build.gradle b/build.gradle index aec7f92..987ac36 100644 --- a/build.gradle +++ b/build.gradle @@ -10,7 +10,7 @@ plugins { } setGroup("net.elytrium") -setVersion("1.1.4") +setVersion("1.1.5") java { setSourceCompatibility(JavaVersion.VERSION_11) diff --git a/src/main/java/net/elytrium/limboauth/LimboAuth.java b/src/main/java/net/elytrium/limboauth/LimboAuth.java index 0e88e2f..49bc15b 100644 --- a/src/main/java/net/elytrium/limboauth/LimboAuth.java +++ b/src/main/java/net/elytrium/limboauth/LimboAuth.java @@ -385,8 +385,11 @@ public class LimboAuth { .setWorldTime(Settings.IMP.MAIN.WORLD_TICKS) .setGameMode(Settings.IMP.MAIN.GAME_MODE) .registerCommand(new LimboCommandMeta(this.filterCommands(Settings.IMP.MAIN.REGISTER_COMMAND))) - .registerCommand(new LimboCommandMeta(this.filterCommands(Settings.IMP.MAIN.LOGIN_COMMAND))) - .registerCommand(new LimboCommandMeta(this.filterCommands(Settings.IMP.MAIN.TOTP_COMMAND))); + .registerCommand(new LimboCommandMeta(this.filterCommands(Settings.IMP.MAIN.LOGIN_COMMAND))); + + if (Settings.IMP.MAIN.ENABLE_TOTP) { + this.authServer.registerCommand(new LimboCommandMeta(this.filterCommands(Settings.IMP.MAIN.TOTP_COMMAND))); + } EventManager eventManager = this.server.getEventManager(); eventManager.unregisterListeners(this); |