Skip to content

Commit 9c012cc

Browse files
committed
Fix command permissions
1 parent 4dac351 commit 9c012cc

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/main/java/com/sentropic/guiapi/command/ReloadCommand.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,10 @@ public class ReloadCommand implements CommandExecutor {
1313
@Override
1414
public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) {
1515
if (args.length == 1 && args[0].equals("reload")) {
16-
if (!sender.hasPermission("misc.command.reload")) { return false; }
1716
GUIAPI.getGUIConfig().reload();
1817
sender.sendMessage(ChatColor.GREEN+"[GUI API] Reloaded config.yml");
1918
return true;
2019
} else if (args.length == 1 && args[0].equals("debug")) {
21-
if (!sender.hasPermission("misc.command.debug")) { return false; }
2220
if (sender instanceof Player) {
2321
GUI gui = GUIAPI.getGUIManager().getGUI((Player) sender);
2422
gui.setDebug(!gui.isDebugging());

src/main/resources/plugin.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,8 @@ commands:
88
guiapi:
99
description: Main plugin command
1010
usage: /guiapi reload, /guiapi debug
11-
permission: guiapi.command.reload, guiapi.command.debug
11+
permission: guiapi.command
12+
permissions:
13+
guiapi.command:
14+
description: Gives access to /guiapi command
15+
default: false

0 commit comments

Comments
 (0)