API reference Obsidian.API.Data
AttachmentType<TValue> class
A player, entity or chunk attachment registration. Values are detached: mutate a Get result and Set it again. Codecs run under the plugin call guard; they must not block or mutate shared plugin state.
public sealed class AttachmentType<TValue>
In Obsidian.API.
Properties
public bool CopyOnDeath { get; }public string Identifier { get; }Events
Changed
public event Action<IAttachmentHolder> Changed;Raised after a holder's value of this type changes: set or removed by the plugin, changed through ItemAttachments.GetItemAccess (a menu click included), dropped at a death or removed at a death's respawn. Not raised as holders load. Handlers run synchronously inside a call into the plugin, possibly with a menu's locks held, so they must not wait; read the new value with a get. An exception from a handler reaches the plugin's own SetAttachment or RemoveAttachment caller, and is logged for the engine's changes. Handlers go with the registration on unload.