mirror of
https://github.com/YouHaveTrouble/PreventStabby.git
synced 2026-05-12 13:26:56 +00:00
permission for help command
This commit is contained in:
@@ -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("<aqua><strikethrough> </strikethrough> PreventStabby Help <strikethrough> </strikethrough>")
|
||||
.append(Component.newline())
|
||||
|
||||
@@ -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 <toggle/enable/disable> command
|
||||
|
||||
Reference in New Issue
Block a user