Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/eyal-wowhub/addon
- Owner: Eyal-WowHub
- Created: 2025-01-02T15:44:14.000Z (22 days ago)
- Default Branch: main
- Last Pushed: 2025-01-05T13:33:58.000Z (19 days ago)
- Last Synced: 2025-01-05T14:33:13.921Z (19 days ago)
- Topics: lib, library, lua, world-of-warcraft, world-of-warcraft-addon, wow, wow-addon
- Language: Lua
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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)
```