Skip to main content

Interface IAddonLifecycle

This class provides events for in-game addon lifecycles.

Assembly: Dalamud.dll
View Source
Declaration
public interface IAddonLifecycle

Methods

RegisterListener(AddonEvent, IEnumerable<string>, AddonEventDelegate)

Register a listener that will trigger on the specified event and any of the specified addons.

View Source
Declaration
void RegisterListener(AddonEvent eventType, IEnumerable<string> addonNames, IAddonLifecycle.AddonEventDelegate handler)
Parameters
TypeNameDescription
Dalamud.Game.Addon.Lifecycle.AddonEventeventTypeEvent type to trigger on.
System.Collections.Generic.IEnumerable<System.String>addonNamesAddon names that will trigger the handler to be invoked.
Dalamud.Plugin.Services.IAddonLifecycle.AddonEventDelegatehandlerThe handler to invoke.

RegisterListener(AddonEvent, string, AddonEventDelegate)

Register a listener that will trigger on the specified event only for the specified addon.

View Source
Declaration
void RegisterListener(AddonEvent eventType, string addonName, IAddonLifecycle.AddonEventDelegate handler)
Parameters
TypeNameDescription
Dalamud.Game.Addon.Lifecycle.AddonEventeventTypeEvent type to trigger on.
System.StringaddonNameThe addon name that will trigger the handler to be invoked.
Dalamud.Plugin.Services.IAddonLifecycle.AddonEventDelegatehandlerThe handler to invoke.

RegisterListener(AddonEvent, AddonEventDelegate)

Register a listener that will trigger on the specified event for any addon.

View Source
Declaration
void RegisterListener(AddonEvent eventType, IAddonLifecycle.AddonEventDelegate handler)
Parameters
TypeNameDescription
Dalamud.Game.Addon.Lifecycle.AddonEventeventTypeEvent type to trigger on.
Dalamud.Plugin.Services.IAddonLifecycle.AddonEventDelegatehandlerThe handler to invoke.

UnregisterListener(AddonEvent, IEnumerable<string>, AddonEventDelegate)

Unregister listener from specified event type and specified addon names.

View Source
Declaration
void UnregisterListener(AddonEvent eventType, IEnumerable<string> addonNames, IAddonLifecycle.AddonEventDelegate handler)
Parameters
TypeNameDescription
Dalamud.Game.Addon.Lifecycle.AddonEventeventTypeEvent type to deregister.
System.Collections.Generic.IEnumerable<System.String>addonNamesAddon names to deregister.
Dalamud.Plugin.Services.IAddonLifecycle.AddonEventDelegatehandlerOptional specific handler to remove.

UnregisterListener(AddonEvent, string, AddonEventDelegate)

Unregister all listeners for the specified event type and addon name.

View Source
Declaration
void UnregisterListener(AddonEvent eventType, string addonName, IAddonLifecycle.AddonEventDelegate handler)
Parameters
TypeNameDescription
Dalamud.Game.Addon.Lifecycle.AddonEventeventTypeEvent type to deregister.
System.StringaddonNameAddon name to deregister.
Dalamud.Plugin.Services.IAddonLifecycle.AddonEventDelegatehandlerOptional specific handler to remove.

UnregisterListener(AddonEvent, AddonEventDelegate)

Unregister an event type handler.

This will only remove a handler that is added via Dalamud.Plugin.Services.IAddonLifecycle.RegisterListener(Dalamud.Game.Addon.Lifecycle.AddonEvent%2cDalamud.Plugin.Services.IAddonLifecycle.AddonEventDelegate).

View Source
Declaration
void UnregisterListener(AddonEvent eventType, IAddonLifecycle.AddonEventDelegate handler)
Parameters
TypeNameDescription
Dalamud.Game.Addon.Lifecycle.AddonEventeventTypeEvent type to deregister.
Dalamud.Plugin.Services.IAddonLifecycle.AddonEventDelegatehandlerOptional specific handler to remove.

UnregisterListener(params AddonEventDelegate[])

Unregister all events that use the specified handlers.

View Source
Declaration
void UnregisterListener(params IAddonLifecycle.AddonEventDelegate[] handlers)
Parameters
TypeNameDescription
Dalamud.Plugin.Services.IAddonLifecycle.AddonEventDelegate[]handlersHandlers to remove.