PluginBase: remove special true/false handling for command permissions

these aren't accepted as permission names anymore, and they never worked properly anyway.
This commit is contained in:
Dylan K. Taylor 2021-10-06 01:12:02 +01:00
parent 5061bbbc25
commit 1fafce6d6f
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -195,9 +195,7 @@ abstract class PluginBase implements Plugin, CommandExecutor{
}
if(isset($data["permission"])){
if(is_bool($data["permission"])){
$newCmd->setPermission($data["permission"] ? "true" : "false");
}elseif(is_string($data["permission"])){
if(is_string($data["permission"])){
$newCmd->setPermission($data["permission"]);
}else{
$this->logger->error("Permission must be a string, " . gettype($data["permission"]) . " given for command $key");