From 0be6671ddc69b7c94b4120eb0d01049418cd375a Mon Sep 17 00:00:00 2001 From: ChomeNS <95471003+ChomeNS@users.noreply.github.com> Date: Fri, 30 Jun 2023 16:45:59 +0700 Subject: [PATCH] the --- .../chipmunk/chayapak/chomens_bot/command/TrustLevel.java | 2 +- .../chipmunk/chayapak/chomens_bot/commands/HelpCommand.java | 6 +++--- .../chayapak/chomens_bot/commands/ServerEvalCommand.java | 2 +- .../chayapak/chomens_bot/plugins/CommandHandlerPlugin.java | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/java/land/chipmunk/chayapak/chomens_bot/command/TrustLevel.java b/src/main/java/land/chipmunk/chayapak/chomens_bot/command/TrustLevel.java index 355a896..d29c74f 100644 --- a/src/main/java/land/chipmunk/chayapak/chomens_bot/command/TrustLevel.java +++ b/src/main/java/land/chipmunk/chayapak/chomens_bot/command/TrustLevel.java @@ -3,5 +3,5 @@ package land.chipmunk.chayapak.chomens_bot.command; public enum TrustLevel { PUBLIC, TRUSTED, - ADMIN + OWNER } diff --git a/src/main/java/land/chipmunk/chayapak/chomens_bot/commands/HelpCommand.java b/src/main/java/land/chipmunk/chayapak/chomens_bot/commands/HelpCommand.java index cbc0602..7764b46 100644 --- a/src/main/java/land/chipmunk/chayapak/chomens_bot/commands/HelpCommand.java +++ b/src/main/java/land/chipmunk/chayapak/chomens_bot/commands/HelpCommand.java @@ -59,7 +59,7 @@ public class HelpCommand implements Command { final List list = new ArrayList<>(); list.addAll(getCommandListByTrustLevel(TrustLevel.PUBLIC)); list.addAll(getCommandListByTrustLevel(TrustLevel.TRUSTED)); - list.addAll(getCommandListByTrustLevel(TrustLevel.ADMIN)); + list.addAll(getCommandListByTrustLevel(TrustLevel.OWNER)); return Component.empty() .append(Component.text("Commands ").color(NamedTextColor.GRAY)) @@ -69,7 +69,7 @@ public class HelpCommand implements Command { .append(Component.text("(").color(NamedTextColor.DARK_GRAY)) .append(Component.text("Public ").color(NamedTextColor.GREEN)) .append(Component.text("Trusted ").color(NamedTextColor.RED)) - .append(Component.text("Admin").color(NamedTextColor.DARK_RED)) + .append(Component.text("Owner").color(NamedTextColor.DARK_RED)) .append(Component.text(") - ").color(NamedTextColor.DARK_GRAY)) .append(Component.join(JoinConfiguration.separator(Component.space()), list)); } @@ -107,7 +107,7 @@ public class HelpCommand implements Command { return switch (trustLevel) { case PUBLIC -> NamedTextColor.GREEN; case TRUSTED -> NamedTextColor.RED; - case ADMIN -> NamedTextColor.DARK_RED; + case OWNER -> NamedTextColor.DARK_RED; }; } diff --git a/src/main/java/land/chipmunk/chayapak/chomens_bot/commands/ServerEvalCommand.java b/src/main/java/land/chipmunk/chayapak/chomens_bot/commands/ServerEvalCommand.java index 41ebc28..fd75577 100644 --- a/src/main/java/land/chipmunk/chayapak/chomens_bot/commands/ServerEvalCommand.java +++ b/src/main/java/land/chipmunk/chayapak/chomens_bot/commands/ServerEvalCommand.java @@ -34,7 +34,7 @@ public class ServerEvalCommand implements Command { } public TrustLevel trustLevel() { - return TrustLevel.ADMIN; + return TrustLevel.OWNER; } public Component execute(CommandContext context, String[] args, String[] fullArgs) { diff --git a/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/CommandHandlerPlugin.java b/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/CommandHandlerPlugin.java index 13b1615..97e16af 100644 --- a/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/CommandHandlerPlugin.java +++ b/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/CommandHandlerPlugin.java @@ -136,7 +136,7 @@ public class CommandHandlerPlugin { ) return Component.text("You're not in the trusted role!").color(NamedTextColor.RED); if ( - command.trustLevel() == TrustLevel.ADMIN && + command.trustLevel() == TrustLevel.OWNER && roles.stream().noneMatch(role -> role.getName().equalsIgnoreCase(adminRoleName)) ) return Component.text("You're not in the admin role!").color(NamedTextColor.RED); } else { @@ -147,7 +147,7 @@ public class CommandHandlerPlugin { ) return Component.text("Invalid hash").color(NamedTextColor.RED); if ( - command.trustLevel() == TrustLevel.ADMIN && + command.trustLevel() == TrustLevel.OWNER && !userHash.equals(bot.hashing().ownerHash()) ) return Component.text("Invalid OwnerHash").color(NamedTextColor.RED); }