mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-18 11:45:30 +00:00
permissions.request function use instead of additional argument for player variable.
This commit is contained in:
parent
daaa9394c4
commit
3e12a41a91
@ -69,9 +69,9 @@ class PermissionsAPI{
|
||||
$newPermissions = ServerAPI::request()->api->dhandle("permissions.request", array('player' => $player));
|
||||
if($newPermissions){
|
||||
//array_push($player->permissions, $newPermissions);
|
||||
array_walk($newPermissions, function ($value, $key, $player) {
|
||||
array_walk($newPermissions, function ($value, $key) use ($player) {
|
||||
$player->permissions[] = $value;
|
||||
}, $player);
|
||||
});
|
||||
}else{
|
||||
//TODO: Give out default permission. Fall back to OP system maybe? Checking for a permissions receiver would be nice.
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user