aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/net/elytrium/limboauth/command/TotpCommand.java
diff options
context:
space:
mode:
authorPetr Ilin <hevav@hevav.dev>2023-01-23 22:55:42 +0300
committerPetr Ilin <hevav@hevav.dev>2023-01-23 22:55:42 +0300
commit5709af5c0ade33aff357650fd4e57f79c4844649 (patch)
treeebb3444d471fa3a5922cabec9735fd693dab2611 /src/main/java/net/elytrium/limboauth/command/TotpCommand.java
parent5493d0efb8cc31fe630a5b02e84dcd0378810b40 (diff)
downloadLimboAuth-5709af5c0ade33aff357650fd4e57f79c4844649.tar.gz
LimboAuth-5709af5c0ade33aff357650fd4e57f79c4844649.tar.bz2
LimboAuth-5709af5c0ade33aff357650fd4e57f79c4844649.zip
Ability to deny/allow commands without permission plugins
Diffstat (limited to 'src/main/java/net/elytrium/limboauth/command/TotpCommand.java')
-rw-r--r--src/main/java/net/elytrium/limboauth/command/TotpCommand.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/net/elytrium/limboauth/command/TotpCommand.java b/src/main/java/net/elytrium/limboauth/command/TotpCommand.java
index b5edb66..e78dbcc 100644
--- a/src/main/java/net/elytrium/limboauth/command/TotpCommand.java
+++ b/src/main/java/net/elytrium/limboauth/command/TotpCommand.java
@@ -21,7 +21,6 @@ import com.j256.ormlite.dao.Dao;
import com.j256.ormlite.stmt.UpdateBuilder;
import com.velocitypowered.api.command.CommandSource;
import com.velocitypowered.api.command.SimpleCommand;
-import com.velocitypowered.api.permission.Tristate;
import com.velocitypowered.api.proxy.Player;
import dev.samstevens.totp.qr.QrData;
import dev.samstevens.totp.recovery.RecoveryCodeGenerator;
@@ -187,6 +186,7 @@ public class TotpCommand implements SimpleCommand {
@Override
public boolean hasPermission(SimpleCommand.Invocation invocation) {
- return invocation.source().getPermissionValue("limboauth.commands.totp") == Tristate.TRUE;
+ return Settings.IMP.MAIN.COMMAND_PERMISSION_STATE.TOTP
+ .hasPermission(invocation.source(), "limboauth.commands.totp");
}
}