Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/eyal-wowhub/addon

A library that facilitates object creation and event handling, providing essential infrastructure for addons.
https://github.com/eyal-wowhub/addon

lib library lua world-of-warcraft world-of-warcraft-addon wow wow-addon

Last synced: 16 days ago
JSON representation

A library that facilitates object creation and event handling, providing essential infrastructure for addons.

Awesome Lists containing this project

README

        

# Addon

A library that facilitates object creation and event handling, providing essential infrastructure for addons.

#### Dependencies: [LibStub](https://www.curseforge.com/wow/addons/libstub), [Contracts](https://github.com/Eyal-WowHub/Contracts)

### Example:

```lua
-- Main.lua
local addon = LibStub("Addon-1.0"):New(...)

function addon:OnInitialized()
print("Hello from " .. addon:GetName())
end

-- Foo.lua
local _, addon = ...
local Foo = addon:NewObject("Foo")

Foo:RegisterEvent("PLAYER_LOGIN", function(_, eventName)
print("Hello from " .. eventName)
end)
```