Skip to content

CommandSender

class

Wraps a native endstone::CommandSender.

Namespace Endstone.Loader

Inheritance object

Derived classes Actor, ConsoleCommandSender

Properties

IsPlayer : bool

{ get; }

Name : string

{ get; }

PermissionLevel : PermissionLevel

{ get; }

Methods

PermissionAttachment AddAttachment(PluginBase plugin)

Adds a new empty permission attachment to this sender.

PermissionAttachment AddAttachment(PluginBase plugin, string name, bool value)

Adds a new permission attachment with a single permission by name and value. The attachment is owned by this sender and stays valid until removed (or this sender is destroyed).

Actor AsActor()

ConsoleCommandSender AsConsole()

Player AsPlayer()

PermissionAttachmentInfo[] GetEffectivePermissions()

bool HasPermission(Permission permission)

Checks whether this sender has the given permission object.

bool HasPermission(string permission)

bool IsPermissionSet(Permission permission)

Checks whether this sender contains an override for the given permission object.

bool IsPermissionSet(string permission)

Checks whether this sender contains an override for the given permission, by fully qualified name.

void RecalculatePermissions()

bool RemoveAttachment(PermissionAttachment attachment)

Removes the given permission attachment from this sender. Returns true when removed successfully, false when it is not part of this sender.

void SendErrorMessage(string message)

void SendErrorMessage(string format, params object[] args)

void SendMessage(string message)

void SendMessage(string format, params object[] args)