diff --git a/src/main/java/me/youhavetrouble/preventstabby/commands/HelpCommand.java b/src/main/java/me/youhavetrouble/preventstabby/commands/HelpCommand.java index 1608b25..d6ca936 100644 --- a/src/main/java/me/youhavetrouble/preventstabby/commands/HelpCommand.java +++ b/src/main/java/me/youhavetrouble/preventstabby/commands/HelpCommand.java @@ -10,6 +10,12 @@ import org.bukkit.command.CommandSender; public class HelpCommand { public static void help(CommandSender sender, String[] args) { Bukkit.getScheduler().runTaskAsynchronously(PreventStabby.getPlugin(), () -> { + + if (!PreventStabbyPermission.COMMAND_HELP.doesCommandSenderHave(sender)) { + PluginMessages.sendMessage(sender, PreventStabby.getPlugin().getConfigCache().getNo_permission()); + return; + } + Component helpComponent = PluginMessages.MINIMESSAGE .deserialize(" PreventStabby Help ") .append(Component.newline()) diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index a27b31d..c91acd3 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -22,6 +22,11 @@ permissions: preventstabby.command: default: true description: Allows usage of /pvp command + preventstabby.command.help: + default: true + description: Allows usage of /pvp help command + children: + preventstabby.command: true preventstabby.command.toggle: default: true description: Allows usage of /pvp command