PocketMine-MP 5.11.1 git-db894e3a4a5bb9a80b3ac07ac91f58bdaf15176a
pocketmine\permission\Permission Class Reference
+ Collaboration diagram for pocketmine\permission\Permission:

Public Member Functions

 __construct (private string $name, Translatable|string|null $description=null, private array $children=[])
 
 addChild (string $name, bool $value)
 
 getChildren ()
 
 getDescription ()
 
 getName ()
 
 getPermissibles ()
 
 recalculatePermissibles ()
 
 removeChild (string $name)
 
 setDescription (Translatable|string $value)
 

Detailed Description

Represents a permission

Definition at line 35 of file Permission.php.

Constructor & Destructor Documentation

◆ __construct()

pocketmine\permission\Permission::__construct ( private string  $name,
Translatable|string|null  $description = null,
private array  $children = [] 
)

Creates a new Permission object to be attached to Permissible objects

Parameters
bool[]$children@phpstan-param array<string, bool> $children

Definition at line 44 of file Permission.php.

Member Function Documentation

◆ addChild()

pocketmine\permission\Permission::addChild ( string  $name,
bool  $value 
)

Definition at line 89 of file Permission.php.

◆ getChildren()

pocketmine\permission\Permission::getChildren ( )
Returns
bool[] @phpstan-return array<string, bool>

Definition at line 62 of file Permission.php.

◆ getDescription()

pocketmine\permission\Permission::getDescription ( )

Definition at line 66 of file Permission.php.

◆ getName()

pocketmine\permission\Permission::getName ( )

Definition at line 54 of file Permission.php.

◆ getPermissibles()

pocketmine\permission\Permission::getPermissibles ( )
Returns
PermissibleInternal[]

Definition at line 77 of file Permission.php.

◆ recalculatePermissibles()

pocketmine\permission\Permission::recalculatePermissibles ( )

Definition at line 81 of file Permission.php.

◆ removeChild()

pocketmine\permission\Permission::removeChild ( string  $name)

Definition at line 94 of file Permission.php.

◆ setDescription()

pocketmine\permission\Permission::setDescription ( Translatable|string  $value)

Definition at line 70 of file Permission.php.


The documentation for this class was generated from the following file: