diff --git a/README.md b/README.md index a1f322c..0947464 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,10 @@ Select kits from a form! Just do /kit and get kits info and select it if availab ## Usage - /kit - List of kits fetched from kits.yml on a form! +## Permissions +- kit.command - Permission to use /kit +- kit. - Permission to use kit specified after kit. + ## Features - Easy config - Enchantments diff --git a/kit.png b/icon.png similarity index 100% rename from kit.png rename to icon.png diff --git a/src/Infernus101/KitUI/Main.php b/src/Infernus101/KitUI/Main.php index ea844b5..bf7ff5f 100644 --- a/src/Infernus101/KitUI/Main.php +++ b/src/Infernus101/KitUI/Main.php @@ -58,6 +58,10 @@ public function onCommand(CommandSender $sender, Command $cmd, String $label, ar } switch(strtolower($cmd->getName())){ case "kit": + if(!$sender->hasPermission("kit.command")){ + $sender->sendMessage(TextFormat::RED."> You don't have permission to use this command!"); + return false; + } if(isset($args[0])){ $sender->sendMessage(TextFormat::GREEN."About:\nKit UI by Infernus101! github.com/Infernus101/KitUI\n".TextFormat::AQUA."Servers - FallenTech.tk | CounterTech.tk 19132"); return false;