mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-19 04:15:04 +00:00
Automatic permission calculation on PermissibleBase construction
thanks to the PermissibleInternal/PermissibleBase architectural change, there's no longer any concern regarding cyclic refs.
This commit is contained in:
@@ -64,10 +64,8 @@ class PermissibleInternal implements Permissible{
|
||||
public function __construct(array $basePermissions){
|
||||
$this->permissionRecalculationCallbacks = new ObjectSet();
|
||||
|
||||
//TODO: we can't setBasePermission here directly due to bad architecture that causes recalculatePermissions to explode
|
||||
//so, this hack has to be done here to prevent permission recalculations until it's fixed...
|
||||
$this->rootPermissions = $basePermissions;
|
||||
//TODO: permissions need to be recalculated here, or inherited permissions won't work
|
||||
$this->recalculatePermissions();
|
||||
}
|
||||
|
||||
public function setBasePermission($name, bool $grant) : void{
|
||||
|
Reference in New Issue
Block a user