CommandSender
extends
Permissible
in
Table of Contents
- addAttachment() : PermissionAttachment
- getEffectivePermissions() : array<string|int, PermissionAttachmentInfo>
- getLanguage() : Language
- getName() : string
- getPermissionRecalculationCallbacks() : ObjectSet|array<string|int, Closure>
- getScreenLineHeight() : int
- Returns the line height of the command-sender's screen. Used for determining sizes for command output pagination such as in the /help command.
- getServer() : Server
- hasPermission() : bool
- Returns the permission value if overridden, or the default value if not
- isPermissionSet() : bool
- Checks if this instance has a permission overridden
- recalculatePermissions() : array<string|int, bool>
- removeAttachment() : void
- sendMessage() : void
- setScreenLineHeight() : void
- Sets the line height used for command output pagination for this command sender. `null` will reset it to default.
Methods
addAttachment()
public
addAttachment(Plugin $plugin[, string|null $name = null ][, bool|null $value = null ]) : PermissionAttachment
Parameters
- $plugin : Plugin
- $name : string|null = null
- $value : bool|null = null
Return values
PermissionAttachment —getEffectivePermissions()
public
getEffectivePermissions() : array<string|int, PermissionAttachmentInfo>
Return values
array<string|int, PermissionAttachmentInfo> —getLanguage()
public
getLanguage() : Language
Return values
Language —getName()
public
getName() : string
Return values
string —getPermissionRecalculationCallbacks()
public
getPermissionRecalculationCallbacks() : ObjectSet|array<string|int, Closure>
Tags
Return values
ObjectSet|array<string|int, Closure> —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.
public
getScreenLineHeight() : int
Return values
int —getServer()
public
getServer() : Server
Return values
Server —hasPermission()
Returns the permission value if overridden, or the default value if not
public
hasPermission(string|Permission $name) : bool
Parameters
- $name : string|Permission
Return values
bool —isPermissionSet()
Checks if this instance has a permission overridden
public
isPermissionSet(string|Permission $name) : bool
Parameters
- $name : string|Permission
Return values
bool —recalculatePermissions()
public
recalculatePermissions() : array<string|int, bool>
Tags
Return values
array<string|int, bool> —changed permission name => old value
removeAttachment()
public
removeAttachment(PermissionAttachment $attachment) : void
Parameters
- $attachment : PermissionAttachment
Return values
void —sendMessage()
public
sendMessage(Translatable|string $message) : void
Parameters
- $message : Translatable|string
Return values
void —setScreenLineHeight()
Sets the line height used for command output pagination for this command sender. `null` will reset it to default.
public
setScreenLineHeight(int|null $height) : void
Parameters
- $height : int|null