pocketmine\Player::removeAttachment PHP Method

removeAttachment() public method

public removeAttachment ( PermissionAttachment $attachment ) : boolean
$attachment pocketmine\permission\PermissionAttachment
return boolean
    public function removeAttachment(PermissionAttachment $attachment)
    {
        if ($this->perm == null) {
            return false;
        }
        $this->perm->removeAttachment($attachment);
        return true;
    }

Usage Example

 public function resetPerms(Player $pl)
 {
     $n = strtolower($pl->getName());
     if (isset($this->perms[$n])) {
         $attach = $this->perms[$n];
         unset($this->perms[$n]);
         $pl->removeAttachment($attach);
         $pl->recalculatePermissions();
     }
 }
All Usage Examples Of pocketmine\Player::removeAttachment
Player