mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 01:46:04 +00:00
Cleaned up code
This commit is contained in:
@ -173,12 +173,13 @@ class Permission{
|
||||
* @param string|Permission $name
|
||||
* @param $value
|
||||
*
|
||||
* @return Permission|void
|
||||
* @return Permission|void Permission if $name is a string, void if it's a Permission
|
||||
*/
|
||||
public function addParent($name, $value){
|
||||
if($name instanceof Permission){
|
||||
$name->getChildren()[$this->getName()] = $value;
|
||||
$name->recalculatePermissibles();
|
||||
return;
|
||||
}else{
|
||||
$perm = Server::getInstance()->getPluginManager()->getPermission($name);
|
||||
if($perm === null){
|
||||
|
Reference in New Issue
Block a user