aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/net/elytrium/limboauth/Settings.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/Settings.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/Settings.java')
-rw-r--r--src/main/java/net/elytrium/limboauth/Settings.java32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/main/java/net/elytrium/limboauth/Settings.java b/src/main/java/net/elytrium/limboauth/Settings.java
index b83341a..17d5782 100644
--- a/src/main/java/net/elytrium/limboauth/Settings.java
+++ b/src/main/java/net/elytrium/limboauth/Settings.java
@@ -28,6 +28,7 @@ import net.elytrium.commons.config.YamlConfig;
import net.elytrium.commons.kyori.serialization.Serializers;
import net.elytrium.limboapi.api.chunk.Dimension;
import net.elytrium.limboapi.api.player.GameMode;
+import net.elytrium.limboauth.command.CommandPermissionState;
import net.elytrium.limboauth.dependencies.DatabaseLibrary;
import net.elytrium.limboauth.migration.MigrationHash;
import net.kyori.adventure.bossbar.BossBar;
@@ -286,6 +287,37 @@ public class Settings extends YamlConfig {
}
}
+ @Create
+ public MAIN.COMMAND_PERMISSION_STATE COMMAND_PERMISSION_STATE;
+
+ @Comment({
+ "Available values: FALSE, TRUE, PERMISSION",
+ " FALSE - the command will be disallowed",
+ " TRUE - the command will be allowed if player has false permission state",
+ " PERMISSION - the command will be allowed if player has true permission state"
+ })
+ public static class COMMAND_PERMISSION_STATE {
+ @Comment("Permission: limboauth.commands.changepassword")
+ public CommandPermissionState CHANGE_PASSWORD = CommandPermissionState.PERMISSION;
+ @Comment("Permission: limboauth.commands.destroysession")
+ public CommandPermissionState DESTROY_SESSION = CommandPermissionState.PERMISSION;
+ @Comment("Permission: limboauth.commands.premium")
+ public CommandPermissionState PREMIUM = CommandPermissionState.PERMISSION;
+ @Comment("Permission: limboauth.commands.totp")
+ public CommandPermissionState TOTP = CommandPermissionState.PERMISSION;
+ @Comment("Permission: limboauth.commands.unregister")
+ public CommandPermissionState UNREGISTER = CommandPermissionState.PERMISSION;
+
+ @Comment("Permission: limboauth.admin.forcechangepassword")
+ public CommandPermissionState FORCE_CHANGE_PASSWORD = CommandPermissionState.PERMISSION;
+ @Comment("Permission: limboauth.admin.forceunregister")
+ public CommandPermissionState FORCE_UNREGISTER = CommandPermissionState.PERMISSION;
+ @Comment("Permission: limboauth.admin.reload")
+ public CommandPermissionState RELOAD = CommandPermissionState.PERMISSION;
+ @Comment("Permission: limboauth.admin.help")
+ public CommandPermissionState HELP = CommandPermissionState.TRUE;
+ }
+
/*
@Create
public Settings.MAIN.EVENTS_PRIORITIES EVENTS_PRIORITIES;