From 5709af5c0ade33aff357650fd4e57f79c4844649 Mon Sep 17 00:00:00 2001 From: Petr Ilin Date: Mon, 23 Jan 2023 22:55:42 +0300 Subject: Ability to deny/allow commands without permission plugins --- .../java/net/elytrium/limboauth/command/DestroySessionCommand.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java/net/elytrium/limboauth/command/DestroySessionCommand.java') diff --git a/src/main/java/net/elytrium/limboauth/command/DestroySessionCommand.java b/src/main/java/net/elytrium/limboauth/command/DestroySessionCommand.java index 604681c..f796f2e 100644 --- a/src/main/java/net/elytrium/limboauth/command/DestroySessionCommand.java +++ b/src/main/java/net/elytrium/limboauth/command/DestroySessionCommand.java @@ -19,7 +19,6 @@ package net.elytrium.limboauth.command; 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 net.elytrium.commons.kyori.serialization.Serializer; import net.elytrium.limboauth.LimboAuth; @@ -55,6 +54,7 @@ public class DestroySessionCommand implements SimpleCommand { @Override public boolean hasPermission(SimpleCommand.Invocation invocation) { - return invocation.source().getPermissionValue("limboauth.commands.destroysession") == Tristate.TRUE; + return Settings.IMP.MAIN.COMMAND_PERMISSION_STATE.DESTROY_SESSION + .hasPermission(invocation.source(), "imboauth.commands.destroysession"); } } -- cgit