Skip to content

NativeRule

Namespace Mc.Scripting.Permissions · Kind struct (readonly)

public readonly struct NativeRule : IEquatable<NativeRule>

A rule of the engine’s permission table: a node or pattern over a context pattern, with a layer and a value.

Member Description
NativeRule(string Node, bool Allow, ushort Layer = 0, byte[]? Context = null) A rule of the engine’s permission table: a node or pattern over a context pattern, with a layer and a value.
public NativeRule(string Node, bool Allow, ushort Layer = 0, byte[]? Context = null)

A rule of the engine’s permission table: a node or pattern over a context pattern, with a layer and a value.

Parameters

Name Type Description
Node string The node or a pattern: “homes.use”, “homes.”, “”.
Allow bool True grants the node, false denies it.
Layer ushort = 0 Lower layers win: 0 the player’s own rules, then the groups by weight (highest first), then the default group.
Context byte[]? = null The six context positions (world, dimension, gamemode, server, slot 0, slot 1); NativePermissionTable.Any matches every value. Null means any in every position.
Member Description
bool Allow { get; init; } True grants the node, false denies it.
byte[]? Context { get; init; } The six context positions (world, dimension, gamemode, server, slot 0, slot 1); NativePermissionTable.Any matches every value.
ushort Layer { get; init; } Lower layers win: 0 the player’s own rules, then the groups by weight (highest first), then the default group.
string Node { get; init; } The node or a pattern: “homes.use”, “homes.”, “”.
public bool Allow { get; init; }

True grants the node, false denies it.

public byte[]? Context { get; init; }

The six context positions (world, dimension, gamemode, server, slot 0, slot 1); NativePermissionTable.Any matches every value. Null means any in every position.

public ushort Layer { get; init; }

Lower layers win: 0 the player’s own rules, then the groups by weight (highest first), then the default group.

public string Node { get; init; }

The node or a pattern: “homes.use”, “homes.”, “”.