Commit 07b9a35c authored by Simpy's avatar Simpy 🐹

libelvuiplugin: more stuff

parent 9ee17359
......@@ -65,14 +65,19 @@ end
--
------------------------------
function lib:RegisterPlugin(name, callback, isLib)
local plugin = {}
plugin.name = name
plugin.version = name == MAJOR and MINOR or GetAddOnMetadata(name, 'Version')
if isLib then plugin.isLib = true; plugin.version = 1 end
plugin.callback = callback
local plugin = {
name = name,
callback = callback,
version = name == MAJOR and MINOR or GetAddOnMetadata(name, 'Version')
}
if isLib then
plugin.isLib = true
plugin.version = 1
end
lib.plugins[name] = plugin
local loaded = IsAddOnLoaded('ElvUI_Config')
if not lib.registeredPrefix then
C_ChatInfo_RegisterAddonMessagePrefix(lib.prefix)
lib.VCFrame:RegisterEvent('CHAT_MSG_ADDON')
......@@ -81,6 +86,7 @@ function lib:RegisterPlugin(name, callback, isLib)
lib.registeredPrefix = true
end
local loaded = IsAddOnLoaded('ElvUI_Config')
if not loaded then
lib.CFFrame:RegisterEvent('ADDON_LOADED')
elseif loaded then
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment