PluginDescription: loosen invalid permission message (it might be wrong type as well as not existing)

This commit is contained in:
Dylan K. Taylor 2021-10-06 01:45:40 +01:00
parent d07517fe8b
commit 258c38f9cd
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -132,7 +132,7 @@ class PluginDescription{
throw new PluginDescriptionParseException("Command $commandName has invalid properties");
}
if(!isset($commandData["permission"]) || !is_string($commandData["permission"])){
throw new PluginDescriptionParseException("Command $commandName does not have a permission set");
throw new PluginDescriptionParseException("Command $commandName does not have a valid permission set");
}
$this->commands[$commandName] = new PluginDescriptionCommandEntry(
$commandData["description"] ?? null,