IPermissionProvider
Namespace Mc.Scripting.Permissions · Kind interface
public interface IPermissionProviderA permission backend: answers “does this player have this node?” with an explicit value or no opinion. Implement it to replace the built-in file-based backend (for example with a database or a LuckPerms-style system) and install it with PermissionManager.SetProvider.
Properties
Section titled “Properties”| Member | Description |
|---|---|
string Name { get; } |
A short name for logs and admin tools. |
string Name { get; }A short name for logs and admin tools.
Methods
Section titled “Methods”| Member | Description |
|---|---|
PermissionValue Get(Uuid player, string node) |
The explicit value of node for the player: wildcards (a.b.*, *) and groups are the provider’s business. |
IReadOnlyCollection<string> Groups(Uuid player) |
The names of the groups the player belongs to (for display and admin commands). |
PermissionValue Get(Uuid player, string node)The explicit value of node for the player: wildcards (a.b.*, *) and groups are the provider’s business. Return PermissionValue.Unset when nothing matches, so the node’s registered default decides.
Parameters
| Name | Type | Description |
|---|---|---|
player |
Uuid |
The player’s profile id. |
node |
string |
The dotted permission node. |
Returns PermissionValue: The value.
Groups
Section titled “Groups”IReadOnlyCollection<string> Groups(Uuid player)The names of the groups the player belongs to (for display and admin commands).
Parameters
| Name | Type | Description |
|---|---|---|
player |
Uuid |
The player’s profile id. |
Returns IReadOnlyCollection<string>: The group names.
Events
Section titled “Events”| Member | Description |
|---|---|
event Action<Uuid?>? Changed |
Raised when permissions changed (the player’s id, or null when a group or everything changed): the server refreshes the command trees. |
Changed
Section titled “Changed”public event Action<Uuid?>? Changed;Raised when permissions changed (the player’s id, or null when a group or everything changed): the server refreshes the command trees.
Returns Action<Uuid?>?