Class endstone::PermissionAttachment¶
ClassList > endstone > PermissionAttachment
Holds information about a permission attachment on a Permissible object.
#include <endstone/permissions/permission_attachment.h>
Public Functions¶
Type | Name |
---|---|
PermissionAttachment (Plugin & plugin, Permissible & permissible) |
|
Permissible & | getPermissible () const |
std::unordered_map< std::string, bool > | getPermissions () const |
Plugin & | getPlugin () const |
PermissionRemovedExecutor | getRemovalCallback () const |
bool | remove () |
void | setPermission (std::string name, bool value) |
void | setPermission (Permission & perm, bool value) |
void | setRemovalCallback (PermissionRemovedExecutor ex) |
void | unsetPermission (std::string name) |
void | unsetPermission (Permission & perm) |
Public Functions Documentation¶
function PermissionAttachment¶
inline endstone::PermissionAttachment::PermissionAttachment (
Plugin & plugin,
Permissible & permissible
)
function getPermissible¶
Gets the Permissible that this is attached to
Returns:
Permissible containing this attachment
function getPermissions¶
inline std::unordered_map< std::string, bool > endstone::PermissionAttachment::getPermissions () const
Gets a copy of all set permissions and values contained within this attachment. This map may be modified but will not affect the attachment, as it is a copy.
Returns:
Copy of all permissions and values expressed by this attachment
function getPlugin¶
Gets the plugin responsible for this attachment
Returns:
Plugin responsible for this permission attachment
function getRemovalCallback¶
Gets the class that was previously set to be called when this attachment was removed from a Permissible. May be empty.
Returns:
Executor to be called when this is removed
function remove¶
Removes this attachment from its registered Permissible
Returns:
true if the permissible was removed successfully, false if it did not exist
function setPermission [½]¶
Sets a permission to the given value, by its fully qualified name
Parameters:
name
Name of the permissionvalue
New value of the permission
function setPermission [2/2]¶
Sets a permission to the given value
Parameters:
perm
Permission to setvalue
New value of the permission
function setRemovalCallback¶
Sets an executor to be called for when this attachment is removed from a Permissible. May be empty.
Parameters:
ex
Executor to be called when this is removed
function unsetPermission [½]¶
Removes the specified permission from this attachment. If the permission does not exist in this attachment, nothing will happen.
Parameters:
name
Name of the permission to remove
function unsetPermission [2/2]¶
Removes the specified permission from this attachment. If the permission does not exist in this attachment, nothing will happen.
Parameters:
perm
Permission to remove
The documentation for this class was generated from the following file include/endstone/permissions/permission_attachment.h