1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Permissionmanager error i no clue why

Discussion in 'Development' started by Levi, Jun 9, 2020.

  1. Levi

    Levi Skeleton

    Messages:
    955
    GitHub:
    captainleviftw
    My code
    PHP:
    PlayerJoiNEvent
    $attachment 
    $player->addAttachment$this->plugin );

    $this->plugin->attachments[$uuid->toString()] = $attachment;
    call setPermissions
    }
    setPermissions
    $permissions 
    = ['gu.fa''kake.ap'];
               
    $attachment $this->attachments[$uuid];
                
    $attachment->clearPermissions();

                
    $attachment->setPermissions($permissions);
    and I get error
    Code:
    [23:07:26] [Server thread/CRITICAL]: TypeError: "Argument 1 passed to pocketmine\permission\PermissionManager::getPermission() must be of the type string, int given, called in phar://D:/PC/Desktop/mc/PocketMine-MP/PocketMine-MP.phar/src/pocketmine/permission/Permis
    sibleBase.php on line 155" (EXCEPTION) in "src/pocketmine/permission/PermissionManager" at line 58
    
    I'm never even used PermissionManager::getPermission() .. i think it's with the $attachment->setPermissions($permissions); I don't know.
     
    Last edited: Jun 9, 2020
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.