IPlayerMeta
Namespace Mc.Scripting.Services · Kind interface
public interface IPlayerMetaPlayer meta and affixes: the prefix, suffix and typed values that a permission provider (or any plugin) supplies for a player, read by the chat, tab and nametag plugins. Registered with ServiceManager; the highest-priority provider answers. Thread: tick thread.
Remarks
Section titled “Remarks”Ramjet’s first-party permissions plugin implements it; without one, a built-in provider answers with no meta and no affixes. Contexts (a world, a server) are not part of this contract yet: a provider that needs them offers its own interface.
Methods
Section titled “Methods”| Member | Description |
|---|---|
IReadOnlyList<Affix> Affixes(Uuid player, AffixKind kind) |
The prefixes or suffixes of a player, highest weight first. |
bool TryGet<T>(Uuid player, MetaKey<T?> key, out T? value) |
The value of a meta key for a player, from the provider’s highest layer that has it. |
Affixes
Section titled “Affixes”IReadOnlyList<Affix> Affixes(Uuid player, AffixKind kind)The prefixes or suffixes of a player, highest weight first.
Parameters
| Name | Type | Description |
|---|---|---|
player |
Uuid |
The player. |
kind |
AffixKind |
Prefixes or suffixes. |
Returns IReadOnlyList<Affix>: The affixes (empty when there are none).
TryGet<T>
Section titled “TryGet<T>”bool TryGet<T>(Uuid player, MetaKey<T?> key, out T? value)The value of a meta key for a player, from the provider’s highest layer that has it.
Type parameters
T: The value type of the key.
Parameters
| Name | Type | Description |
|---|---|---|
player |
Uuid |
The player (online or offline). |
key |
MetaKey<T?> |
The key. |
value |
out T? |
The value when found; the default otherwise. |
Returns bool: Whether the player has a value for the key.
Events
Section titled “Events”| Member | Description |
|---|---|
event Action<Uuid?>? Changed |
Raised when a player’s meta or affixes changed (tick thread). |
Changed
Section titled “Changed”public event Action<Uuid?>? Changed;Raised when a player’s meta or affixes changed (tick thread). A null uuid means every player may have changed.
Returns Action<Uuid?>?