mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 12:18:46 +00:00
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:
parent
5061bbbc25
commit
1fafce6d6f
@ -195,9 +195,7 @@ abstract class PluginBase implements Plugin, CommandExecutor{
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(isset($data["permission"])){
|
if(isset($data["permission"])){
|
||||||
if(is_bool($data["permission"])){
|
if(is_string($data["permission"])){
|
||||||
$newCmd->setPermission($data["permission"] ? "true" : "false");
|
|
||||||
}elseif(is_string($data["permission"])){
|
|
||||||
$newCmd->setPermission($data["permission"]);
|
$newCmd->setPermission($data["permission"]);
|
||||||
}else{
|
}else{
|
||||||
$this->logger->error("Permission must be a string, " . gettype($data["permission"]) . " given for command $key");
|
$this->logger->error("Permission must be a string, " . gettype($data["permission"]) . " given for command $key");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user