◆ __construct()
- Parameters
- 
  
  
- Exceptions
- 
  
  
   49         if(!$plugin->isEnabled()){
    50             throw new PluginException(
"Plugin " . $plugin->getDescription()->getName() . 
" is disabled");
    53         $this->permissible = $permissible;
    54         $this->plugin = $plugin;
  
 
◆ clearPermissions()
   93         $this->permissions = [];
    94         $this->permissible->recalculatePermissions();
  
 
◆ getPermissible()
◆ getPermissions()
- Returns
- bool[] 
   89         return $this->permissions;
  
 
◆ getPlugin()
◆ getRemovalCallback()
◆ remove()
- Returns
- void 
  148         $this->permissible->removeAttachment($this);
  
 
◆ setPermission()
      
        
          | setPermission | ( |  | $name, | 
        
          |  |  |  | $value | 
        
          |  | ) |  |  | 
      
 
- Parameters
- 
  
  
  122         $name = $name instanceof Permission ? $name->getName() : $name;
   123         if(isset($this->permissions[$name])){
   124             if($this->permissions[$name] === $value){
   127             unset($this->permissions[$name]); 
   129         $this->permissions[$name] = $value;
   130         $this->permissible->recalculatePermissions();
  
 
◆ setPermissions()
      
        
          | setPermissions | ( | array | $permissions | ) |  | 
      
 
- Parameters
- 
  
  
  101         foreach($permissions as $key => $value){
   102             $this->permissions[$key] = (bool) $value;
   104         $this->permissible->recalculatePermissions();
  
 
◆ setRemovalCallback()
◆ unsetPermission()
- Parameters
- 
  
  
  137         $name = $name instanceof Permission ? $name->getName() : $name;
   138         if(isset($this->permissions[$name])){
   139             unset($this->permissions[$name]);
   140             $this->permissible->recalculatePermissions();
  
 
◆ unsetPermissions()
      
        
          | unsetPermissions | ( | array | $permissions | ) |  | 
      
 
- Parameters
- 
  
  
  111         foreach($permissions as $node){
   112             unset($this->permissions[$node]);
   114         $this->permissible->recalculatePermissions();
  
 
The documentation for this class was generated from the following file:
- src/pocketmine/permission/PermissionAttachment.php