endstone.permissions

Classes relating to permissions of players.

Classes relating to permissions of players.

Classes

NameDescription
Permissible

Represents an object that may become a server operator and can be assigned permissions.

Permission

Represents a unique permission that may be attached to a Permissible

PermissionAttachment

Holds information about a permission attachment on a Permissible object

PermissionAttachmentInfo

Holds information on a permission and which PermissionAttachment provides it

PermissionDefault

Represents the possible default values for permissions

PermissionLevel

classPermissible

Permissible()

Represents an object that may become a server operator and can be assigned permissions.

Methods

NameDescription
recalculate_permissions

Recalculates the permissions.

remove_attachment

Removes a given PermissionAttachment.

Attributes

NameTypeDescription
effective_permissionsset[PermissionAttachmentInfo]

Gets effective permissions.

permission_levelPermissionLevel

Gets the permission level of this object

attreffective_permissionsproperty

effective_permissions: set[PermissionAttachmentInfo]

Gets effective permissions.

attrpermission_levelproperty

permission_level: PermissionLevel

Gets the permission level of this object

methrecalculate_permissions

recalculate_permissions() -> None

Recalculates the permissions.

methremove_attachment

remove_attachment(attachment: PermissionAttachment) -> bool

Removes a given PermissionAttachment.

classPermission

Permission(name: str, description: str | None = None, default: PermissionDefault | None = None, children: Mapping[str, bool] | None = None, *args, **kwargs)

Represents a unique permission that may be attached to a Permissible

Methods

NameDescription
recalculate_permissibles

Recalculates all Permissibles that contain this permission.

Attributes

NameTypeDescription
childrendict[str, bool]

Gets the children of this permission.

defaultPermissionDefault

The default value of this permission.

descriptionstr

The brief description of this permission

namestr

Gets the unique fully qualified name of this Permission.

permissiblesset[Permissible]

Gets a set containing every Permissible that has this permission.

attrchildrenproperty

children: dict[str, bool]

Gets the children of this permission.

attrdefaultproperty

The default value of this permission.

attrdescriptionproperty

description: str

The brief description of this permission

attrnameproperty

name: str

Gets the unique fully qualified name of this Permission.

attrpermissiblesproperty

permissibles: set[Permissible]

Gets a set containing every Permissible that has this permission.

methrecalculate_permissibles

recalculate_permissibles() -> None

Recalculates all Permissibles that contain this permission.

classPermissionAttachment

PermissionAttachment(plugin: Plugin, permissible: Permissible)

Holds information about a permission attachment on a Permissible object

Methods

NameDescription
remove

Removes this attachment from its registered Permissible.

Attributes

NameTypeDescription
permissiblePermissible

Gets the Permissible that this is attached to.

permissionsdict[str, bool]

Gets a copy of all set permissions and values contained within this attachment.

pluginPlugin

Gets the plugin responsible for this attachment.

removal_callbackCallable[[PermissionAttachment], None]

The callback to be called when this attachment is removed.

attrpermissibleproperty

permissible: Permissible

Gets the Permissible that this is attached to.

attrpermissionsproperty

permissions: dict[str, bool]

Gets a copy of all set permissions and values contained within this attachment.

attrpluginproperty

plugin: Plugin

Gets the plugin responsible for this attachment.

attrremoval_callbackproperty

removal_callback: Callable[[PermissionAttachment], None]

The callback to be called when this attachment is removed.

methremove

remove() -> bool

Removes this attachment from its registered Permissible.

classPermissionAttachmentInfo

PermissionAttachmentInfo(permissible: Permissible, permission: str, attachment: PermissionAttachment, value: bool)

Holds information on a permission and which PermissionAttachment provides it

Attributes

NameTypeDescription
attachmentPermissionAttachment

Gets the attachment providing this permission.

permissiblePermissible

Get the permissible this is attached to

permissionstr

Gets the permission being set

valuebool

Gets the value of this permission

attrattachmentproperty

Gets the attachment providing this permission.

attrpermissibleproperty

permissible: Permissible

Get the permissible this is attached to

attrpermissionproperty

permission: str

Gets the permission being set

attrvalueproperty

value: bool

Gets the value of this permission

classPermissionDefault

Bases: Enum

PermissionDefault()

Represents the possible default values for permissions

Attributes

NameTypeDescription
CONSOLE
FALSE
NOT_OP
OP
TRUE

attrCONSOLE

CONSOLE = 4

attrFALSE

FALSE = 1

attrNOT_OP

NOT_OP = 3

attrOP

OP = 2

attrTRUE

TRUE = 0

classPermissionLevel

Bases: IntEnum

PermissionLevel()

Attributes

NameTypeDescription
CONSOLE
DEFAULT
OP

attrCONSOLE

CONSOLE = 2

attrDEFAULT

DEFAULT = 0

attrOP

OP = 1

On this page