mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-16 11:58:00 +00:00
Use an array for command permissions
it doesn't make sense to have to parse the string every time we want to verify permissions, nor to expect that people will somehow know to use ; to separate them without it being documented anywhere...
This commit is contained in:
@@ -44,14 +44,14 @@ class WhitelistCommand extends VanillaCommand{
|
||||
KnownTranslationFactory::pocketmine_command_whitelist_description(),
|
||||
KnownTranslationFactory::commands_whitelist_usage()
|
||||
);
|
||||
$this->setPermission(implode(";", [
|
||||
$this->setPermissions([
|
||||
DefaultPermissionNames::COMMAND_WHITELIST_RELOAD,
|
||||
DefaultPermissionNames::COMMAND_WHITELIST_ENABLE,
|
||||
DefaultPermissionNames::COMMAND_WHITELIST_DISABLE,
|
||||
DefaultPermissionNames::COMMAND_WHITELIST_LIST,
|
||||
DefaultPermissionNames::COMMAND_WHITELIST_ADD,
|
||||
DefaultPermissionNames::COMMAND_WHITELIST_REMOVE
|
||||
]));
|
||||
]);
|
||||
}
|
||||
|
||||
public function execute(CommandSender $sender, string $commandLabel, array $args){
|
||||
|
Reference in New Issue
Block a user