Interface IAddonLifecycle
This class provides events for in-game addon lifecycles.
Assembly: Dalamud.dll
View Source
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
void RegisterListener(AddonEvent eventType, IEnumerable<string> addonNames, IAddonLifecycle.AddonEventDelegate handler)
Parameters
Type | Name | Description |
---|---|---|
Dalamud.Game.Addon.Lifecycle.AddonEvent | eventType | Event type to trigger on. |
System.Collections.Generic.IEnumerable<System.String> | addonNames | Addon names that will trigger the handler to be invoked. |
Dalamud.Plugin.Services.IAddonLifecycle.AddonEventDelegate | handler | The handler to invoke. |
RegisterListener(AddonEvent, string, AddonEventDelegate)
Register a listener that will trigger on the specified event only for the specified addon.
View Source
void RegisterListener(AddonEvent eventType, string addonName, IAddonLifecycle.AddonEventDelegate handler)
Parameters
Type | Name | Description |
---|---|---|
Dalamud.Game.Addon.Lifecycle.AddonEvent | eventType | Event type to trigger on. |
System.String | addonName | The addon name that will trigger the handler to be invoked. |
Dalamud.Plugin.Services.IAddonLifecycle.AddonEventDelegate | handler | The handler to invoke. |
RegisterListener(AddonEvent, AddonEventDelegate)
Register a listener that will trigger on the specified event for any addon.
View Source
void RegisterListener(AddonEvent eventType, IAddonLifecycle.AddonEventDelegate handler)
Parameters
Type | Name | Description |
---|---|---|
Dalamud.Game.Addon.Lifecycle.AddonEvent | eventType | Event type to trigger on. |
Dalamud.Plugin.Services.IAddonLifecycle.AddonEventDelegate | handler | The handler to invoke. |
UnregisterListener(AddonEvent, IEnumerable<string>, AddonEventDelegate)
Unregister listener from specified event type and specified addon names.
View Source
void UnregisterListener(AddonEvent eventType, IEnumerable<string> addonNames, IAddonLifecycle.AddonEventDelegate handler)
Parameters
Type | Name | Description |
---|---|---|
Dalamud.Game.Addon.Lifecycle.AddonEvent | eventType | Event type to deregister. |
System.Collections.Generic.IEnumerable<System.String> | addonNames | Addon names to deregister. |
Dalamud.Plugin.Services.IAddonLifecycle.AddonEventDelegate | handler | Optional specific handler to remove. |
UnregisterListener(AddonEvent, string, AddonEventDelegate)
Unregister all listeners for the specified event type and addon name.
View Source
void UnregisterListener(AddonEvent eventType, string addonName, IAddonLifecycle.AddonEventDelegate handler)
Parameters
Type | Name | Description |
---|---|---|
Dalamud.Game.Addon.Lifecycle.AddonEvent | eventType | Event type to deregister. |
System.String | addonName | Addon name to deregister. |
Dalamud.Plugin.Services.IAddonLifecycle.AddonEventDelegate | handler | Optional 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
void UnregisterListener(AddonEvent eventType, IAddonLifecycle.AddonEventDelegate handler)
Parameters
Type | Name | Description |
---|---|---|
Dalamud.Game.Addon.Lifecycle.AddonEvent | eventType | Event type to deregister. |
Dalamud.Plugin.Services.IAddonLifecycle.AddonEventDelegate | handler | Optional specific handler to remove. |
UnregisterListener(params AddonEventDelegate[])
Unregister all events that use the specified handlers.
View Source
void UnregisterListener(params IAddonLifecycle.AddonEventDelegate[] handlers)
Parameters
Type | Name | Description |
---|---|---|
Dalamud.Plugin.Services.IAddonLifecycle.AddonEventDelegate[] | handlers | Handlers to remove. |