PocketMine-MP 5.15.1 git-fb9a74e8799c71ed8292cfa53abe7a4c9204629d
pocketmine\utils\BroadcastLoggerForwarder Class Reference
+ Inheritance diagram for pocketmine\utils\BroadcastLoggerForwarder:
+ Collaboration diagram for pocketmine\utils\BroadcastLoggerForwarder:

Public Member Functions

 __construct (private Server $server, private \Logger $logger, private Language $language)
 
 addAttachment (Plugin $plugin, ?string $name=null, ?bool $value=null)
 
 getEffectivePermissions ()
 
 getLanguage ()
 
 getName ()
 
 getPermissionRecalculationCallbacks ()
 
 getScreenLineHeight ()
 
 getServer ()
 
 hasPermission (Permission|string $name)
 
 isPermissionSet (Permission|string $name)
 
 recalculatePermissions ()
 
 removeAttachment (PermissionAttachment $attachment)
 
 sendMessage (Translatable|string $message)
 
 setBasePermission (Permission|string $name, bool $grant)
 
 setScreenLineHeight (?int $height)
 
 unsetBasePermission (Permission|string $name)
 

Detailed Description

Forwards any messages it receives via sendMessage() to the given logger. Used for forwarding chat messages and command audit log messages to the server log file.

Unfortunately, broadcast subscribers are currently required to implement CommandSender, so this class has to include a lot of useless methods.

Definition at line 41 of file BroadcastLoggerForwarder.php.

Constructor & Destructor Documentation

◆ __construct()

pocketmine\utils\BroadcastLoggerForwarder::__construct ( private Server  $server,
private \Logger  $logger,
private Language  $language 
)

Definition at line 44 of file BroadcastLoggerForwarder.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.

◆ getLanguage()

pocketmine\utils\BroadcastLoggerForwarder::getLanguage ( )

Implements pocketmine\command\CommandSender.

Definition at line 53 of file BroadcastLoggerForwarder.php.

◆ getName()

pocketmine\utils\BroadcastLoggerForwarder::getName ( )

Implements pocketmine\command\CommandSender.

Definition at line 69 of file BroadcastLoggerForwarder.php.

◆ getPermissionRecalculationCallbacks()

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

Implemented in pocketmine\permission\PermissibleInternal.

◆ getScreenLineHeight()

pocketmine\utils\BroadcastLoggerForwarder::getScreenLineHeight ( )

Returns the line height of the command-sender's screen. Used for determining sizes for command output pagination such as in the /help command. @phpstan-return positive-int

Implements pocketmine\command\CommandSender.

Definition at line 73 of file BroadcastLoggerForwarder.php.

◆ getServer()

pocketmine\utils\BroadcastLoggerForwarder::getServer ( )

Implements pocketmine\command\CommandSender.

Definition at line 65 of file BroadcastLoggerForwarder.php.

◆ 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.

◆ sendMessage()

pocketmine\utils\BroadcastLoggerForwarder::sendMessage ( Translatable|string  $message)

Implements pocketmine\command\CommandSender.

Definition at line 57 of file BroadcastLoggerForwarder.php.

◆ 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.

◆ setScreenLineHeight()

pocketmine\utils\BroadcastLoggerForwarder::setScreenLineHeight ( ?int  $height)

Sets the line height used for command output pagination for this command sender. null will reset it to default. @phpstan-param positive-int|null $height

Implements pocketmine\command\CommandSender.

Definition at line 77 of file BroadcastLoggerForwarder.php.

◆ 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: