mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 18:32:55 +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:
@ -27,6 +27,7 @@ use pocketmine\command\Command;
|
||||
use pocketmine\command\CommandSender;
|
||||
use pocketmine\command\utils\InvalidCommandSyntaxException;
|
||||
use pocketmine\lang\TranslationContainer;
|
||||
use pocketmine\permission\DefaultPermissionNames;
|
||||
use pocketmine\player\Player;
|
||||
use pocketmine\scheduler\BulkCurlTask;
|
||||
use pocketmine\scheduler\BulkCurlTaskOperation;
|
||||
@ -60,7 +61,7 @@ class TimingsCommand extends VanillaCommand{
|
||||
"%pocketmine.command.timings.description",
|
||||
"%pocketmine.command.timings.usage"
|
||||
);
|
||||
$this->setPermission("pocketmine.command.timings");
|
||||
$this->setPermission(DefaultPermissionNames::COMMAND_TIMINGS);
|
||||
}
|
||||
|
||||
public function execute(CommandSender $sender, string $commandLabel, array $args){
|
||||
|
Reference in New Issue
Block a user