McPermissionAttribute
Namespace Mc.Scripting · Kind class (sealed)
public sealed class McPermissionAttribute : AttributeDeclares a permission node of a source plugin (the permissions array of plugin.json): [assembly: McPermission("homes.use", Default = "true", Description = "Use /home")]. Like McPluginAttribute it is read from the syntax before compiling, so the arguments must be string literals.
Constructors
Section titled “Constructors”| Member | Description |
|---|---|
McPermissionAttribute(string node) |
Declares a permission node of a source plugin (the permissions array of plugin.json): [assembly: McPermission("homes.use", Default = "true", Description = "Use /home")]. |
Constructor
Section titled “Constructor”public McPermissionAttribute(string node)Declares a permission node of a source plugin (the permissions array of plugin.json): [assembly: McPermission("homes.use", Default = "true", Description = "Use /home")]. Like McPluginAttribute it is read from the syntax before compiling, so the arguments must be string literals.
Parameters
| Name | Type | Description |
|---|---|---|
node |
string |
Properties
Section titled “Properties”| Member | Description |
|---|---|
string? Default { get; init; } |
Who has it by default: true, false, op, op:N or not_op (default op). |
string? Description { get; init; } |
What the permission allows. |
string Node { get; } |
The permission node. |
Default
Section titled “Default”public string? Default { get; init; }Who has it by default: true, false, op, op:N or not_op (default op).
Description
Section titled “Description”public string? Description { get; init; }What the permission allows.
public string Node { get; }The permission node.