diff --git a/bukkit-post-1.13/src/main/resources/plugin.yml b/bukkit-post-1.13/src/main/resources/plugin.yml index 1e900a24..7c3df1cc 100644 --- a/bukkit-post-1.13/src/main/resources/plugin.yml +++ b/bukkit-post-1.13/src/main/resources/plugin.yml @@ -6,4 +6,5 @@ api-version: "1.13" commands: tebex: aliases: [buycraft] - description: Main command for the Tebex plugin. \ No newline at end of file + permission: buycraft.admin + description: Main command for the Tebex plugin. diff --git a/bungeecord/src/main/java/net/buycraft/plugin/bungeecord/BuycraftCommand.java b/bungeecord/src/main/java/net/buycraft/plugin/bungeecord/BuycraftCommand.java index 74a48ac2..79b0eae1 100644 --- a/bungeecord/src/main/java/net/buycraft/plugin/bungeecord/BuycraftCommand.java +++ b/bungeecord/src/main/java/net/buycraft/plugin/bungeecord/BuycraftCommand.java @@ -14,13 +14,13 @@ public class BuycraftCommand extends Command { private final BuycraftPlugin plugin; public BuycraftCommand(BuycraftPlugin plugin) { - super("tebex", null, "buycraft"); + super("tebex", "buycraft.admin", "buycraft"); this.plugin = plugin; } @Override public void execute(CommandSender sender, String[] args) { - if (!sender.hasPermission("buycraft.admin")) { + if (!sender.hasPermission(this.getPermission())) { sender.sendMessage(ChatColor.RED + plugin.getI18n().get("no_permission")); return; }