PocketMine-MP 5.23.3 git-f7687af337d001ddbcc47b8e773f014a33faa662
Loading...
Searching...
No Matches
pocketmine\permission\PermissibleBase Class Reference
+ Inheritance diagram for pocketmine\permission\PermissibleBase:
+ Collaboration diagram for pocketmine\permission\PermissibleBase:

Public Member Functions

 __construct (array $basePermissions)
 
 addAttachment (Plugin $plugin, ?string $name=null, ?bool $value=null)
 
 getEffectivePermissions ()
 
 getPermissionRecalculationCallbacks ()
 
 hasPermission (Permission|string $name)
 
 isPermissionSet (Permission|string $name)
 
 recalculatePermissions ()
 
 removeAttachment (PermissionAttachment $attachment)
 
 setBasePermission (Permission|string $name, bool $grant)
 
 unsetBasePermission (Permission|string $name)
 

Detailed Description

Definition at line 26 of file PermissibleBase.php.

Constructor & Destructor Documentation

◆ __construct()

pocketmine\permission\PermissibleBase::__construct ( array $basePermissions)
Parameters
bool[]$basePermissions@phpstan-param array<string, bool> $basePermissions

Definition at line 35 of file PermissibleBase.php.

◆ __destruct()

pocketmine\permission\PermissibleBase::__destruct ( )

Definition at line 40 of file PermissibleBase.php.

Member Function Documentation

◆ addAttachment()

pocketmine\permission\Permissible::addAttachment ( Plugin $plugin,
?string $name = null,
?bool $value = null )
inherited

◆ getEffectivePermissions()

pocketmine\permission\Permissible::getEffectivePermissions ( )
inherited
Returns
PermissionAttachmentInfo[]

Implemented in pocketmine\permission\PermissibleInternal.

◆ getPermissionRecalculationCallbacks()

pocketmine\permission\Permissible::getPermissionRecalculationCallbacks ( )
inherited
Returns
ObjectSet|\Closure[] @phpstan-return ObjectSet<\Closure(array<string, bool> $changedPermissionsOldValues) : void>

Implemented in pocketmine\permission\PermissibleInternal.

◆ hasPermission()

pocketmine\permission\Permissible::hasPermission ( Permission|string $name)
inherited

Returns the permission value if overridden, or the default value if not

Implemented in pocketmine\permission\PermissibleInternal.

◆ isPermissionSet()

pocketmine\permission\Permissible::isPermissionSet ( Permission|string $name)
inherited

Checks if this instance has a permission overridden

Implemented in pocketmine\permission\PermissibleInternal.

◆ recalculatePermissions()

pocketmine\permission\Permissible::recalculatePermissions ( )
inherited
Returns
bool[] changed permission name => old value @phpstan-return array<string, bool>

Implemented in pocketmine\permission\PermissibleInternal.

◆ setBasePermission()

pocketmine\permission\Permissible::setBasePermission ( Permission|string $name,
bool $grant )
inherited

Assigns a baseline permission to the permissible. This is always calculated before anything else, which means that permissions set using addAttachment() will always override base permissions. You probably don't want to use this if you're not assigning (denying) operator permissions.

Implemented in pocketmine\permission\PermissibleInternal.

◆ unsetBasePermission()

pocketmine\permission\Permissible::unsetBasePermission ( Permission|string $name)
inherited

Unsets a baseline permission previously set. If it wasn't already set, this will have no effect. Note that this might have different results than setting the permission to false.

Implemented in pocketmine\permission\PermissibleInternal.


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