mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-16 11:58:00 +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:
@@ -26,6 +26,7 @@ namespace pocketmine\command\defaults;
|
||||
use pocketmine\command\CommandSender;
|
||||
use pocketmine\command\utils\InvalidCommandSyntaxException;
|
||||
use pocketmine\lang\TranslationContainer;
|
||||
use pocketmine\permission\DefaultPermissionNames;
|
||||
use function array_slice;
|
||||
use function count;
|
||||
use function implode;
|
||||
@@ -38,7 +39,7 @@ class TitleCommand extends VanillaCommand{
|
||||
"%pocketmine.command.title.description",
|
||||
"%commands.title.usage"
|
||||
);
|
||||
$this->setPermission("pocketmine.command.title");
|
||||
$this->setPermission(DefaultPermissionNames::COMMAND_TITLE);
|
||||
}
|
||||
|
||||
public function execute(CommandSender $sender, string $commandLabel, array $args){
|
||||
|
Reference in New Issue
Block a user