mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-23 04:59:46 +00:00
permissions.request function use instead of additional argument for player variable.
This commit is contained in:
parent
daaa9394c4
commit
3e12a41a91
1 changed files with 2 additions and 2 deletions
|
|
@ -69,9 +69,9 @@ class PermissionsAPI{
|
||||||
$newPermissions = ServerAPI::request()->api->dhandle("permissions.request", array('player' => $player));
|
$newPermissions = ServerAPI::request()->api->dhandle("permissions.request", array('player' => $player));
|
||||||
if($newPermissions){
|
if($newPermissions){
|
||||||
//array_push($player->permissions, $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->permissions[] = $value;
|
||||||
}, $player);
|
});
|
||||||
}else{
|
}else{
|
||||||
//TODO: Give out default permission. Fall back to OP system maybe? Checking for a permissions receiver would be nice.
|
//TODO: Give out default permission. Fall back to OP system maybe? Checking for a permissions receiver would be nice.
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue