mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-17 04:06:54 +00:00
Stop hardcoding permission names everywhere
using strings for permission names is nearly as shitty, but this is at least cross-referencable and statically analysable.
This commit is contained in:
@@ -25,6 +25,7 @@ namespace pocketmine\command\defaults;
|
||||
|
||||
use pocketmine\command\CommandSender;
|
||||
use pocketmine\lang\TranslationContainer;
|
||||
use pocketmine\permission\DefaultPermissionNames;
|
||||
use pocketmine\plugin\Plugin;
|
||||
use pocketmine\utils\TextFormat;
|
||||
use function array_map;
|
||||
@@ -42,7 +43,7 @@ class PluginsCommand extends VanillaCommand{
|
||||
"%pocketmine.command.plugins.usage",
|
||||
["pl"]
|
||||
);
|
||||
$this->setPermission("pocketmine.command.plugins");
|
||||
$this->setPermission(DefaultPermissionNames::COMMAND_PLUGINS);
|
||||
}
|
||||
|
||||
public function execute(CommandSender $sender, string $commandLabel, array $args){
|
||||
|
Reference in New Issue
Block a user