Class endstone::ProxiedCommandSender¶
ClassList > endstone > ProxiedCommandSender
Represents a command sender that is running a command on behalf of another one, as /execute does.More...
#include <endstone/command/proxied_command_sender.h>
Inherits the following classes: endstone::CommandSender
Public Functions¶
| Type | Name |
|---|---|
| virtual NotNull< CommandSender > | getCallee () const = 0 Returns the CommandSender which is being used to call the command. |
| virtual NotNull< CommandSender > | getCaller () const = 0 Returns the CommandSender which triggered this proxied command. |
Public Functions inherited from endstone::CommandSender¶
| Type | Name |
|---|---|
| virtual std::string | getName () const = 0 Gets the name of this command sender. |
| virtual Server & | getServer () const = 0 Returns the server instance that this command is running on. |
| virtual void | sendErrorMessage (const Message & message) const = 0 Sends this sender a error message. |
| void | sendErrorMessage (const std::format_string< Args... > format, Args &&... args) const |
| virtual void | sendMessage (const Message & message) const = 0 Sends this sender a message. |
| void | sendMessage (const std::format_string< Args... > format, Args &&... args) const |
Public Functions inherited from endstone::Permissible¶
| Type | Name |
|---|---|
| virtual NotNull< PermissionAttachment > | addAttachment (Plugin & plugin, const std::string & name, bool value) = 0 Adds a new PermissionAttachment with a single permission by name and value. |
| virtual NotNull< PermissionAttachment > | addAttachment (Plugin & plugin) = 0 Adds a new empty PermissionAttachment to this object. |
| virtual std::unordered_set< NotNull< PermissionAttachmentInfo > > | getEffectivePermissions () const = 0 Gets a set containing all the permissions currently in effect by this object. |
| virtual PermissionLevel | getPermissionLevel () const = 0 Gets the permission level of this object. |
| virtual bool | hasPermission (std::string name) const = 0 Gets the value of the specified permission, if set. |
| virtual bool | hasPermission (const NotNull< Permission > & perm) const = 0 Gets the value of the specified permission, if set. |
| virtual bool | isPermissionSet (std::string name) const = 0 Checks if this object contains an override for the specified permission, by fully qualified name. |
| virtual bool | isPermissionSet (const NotNull< Permission > & perm) const = 0 Checks if this object contains an override for the specified Permission . |
| virtual void | recalculatePermissions () = 0 Recalculates the permissions for this object, if the attachments have changed values. |
| virtual bool | removeAttachment (const NotNull< PermissionAttachment > & attachment) = 0 Removes the given PermissionAttachment from this object. |
Public Functions inherited from endstone::Object¶
See endstone::Object
| Type | Name |
|---|---|
| T * | as () Attempts to cast this object to the given type T. |
| const T * | as () const Attempts to cast this object to the given type T. |
| virtual ClassInfo | getClassInfo () const = 0 |
| bool | is () const Checks if this object is an instance of the given type T (or a subclass of T). |
| virtual bool | isInstanceOf (ClassInfo target) const = 0 |
| virtual | ~Object () = default |
Detailed Description¶
Output and permissions belong to the caller, while the name and the execution context belong to the callee.
Public Functions Documentation¶
function getCallee¶
Returns the CommandSender which is being used to call the command.
Returns:
The sender which the command is being run as
function getCaller¶
Returns the CommandSender which triggered this proxied command.
Returns:
The caller which triggered the command
The documentation for this class was generated from the following file include/endstone/command/proxied_command_sender.h