Skip to content

McPermissionAttribute

Namespace Mc.Scripting · Kind class (sealed)

public sealed class McPermissionAttribute : Attribute

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.

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")].
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
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.
public string? Default { get; init; }

Who has it by default: true, false, op, op:N or not_op (default op).

public string? Description { get; init; }

What the permission allows.

public string Node { get; }

The permission node.