mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
Fixed Permissible::setPermission() not using the correct order on replacement
This commit is contained in:
@ -194,10 +194,10 @@ class PermissibleBase implements Permissible{
|
||||
* @param bool $invert
|
||||
* @param PermissionAttachment $attachment
|
||||
*/
|
||||
public function calculateChildPermissions(array $children, $invert, $attachment){
|
||||
foreach(array_keys($children) as $name){
|
||||
private function calculateChildPermissions(array $children, $invert, $attachment){
|
||||
foreach($children as $name => $v){
|
||||
$perm = Server::getInstance()->getPluginManager()->getPermission($name);
|
||||
$value = $invert === true ? !$children[$name] : $children[$name];
|
||||
$value = ($v xor $invert);
|
||||
$this->permissions[$name] = new PermissionAttachmentInfo($this->parent, $name, $attachment, $value);
|
||||
Server::getInstance()->getPluginManager()->subscribeToPermission($name, $this->parent);
|
||||
|
||||
|
Reference in New Issue
Block a user