Plugins are the primary and recommended way to extend FrameworkZ. A plugin is a Lua table that is created via `FrameworkZ.Plugins:CreatePlugin()`, populated with lifecycle functions and hook handlers, then registered with `FrameworkZ.Plugins:RegisterPlugin()`.
A minimal plugin looks like this:
local MyPlugin = FrameworkZ.Plugins:CreatePlugin("MyPlugin")
MyPlugin.Meta = {
Author = "YourName",
Name = "MyPlugin",
Description = "A short description of what this plugin does.",
Version = "1.0.0",
Compatibility = "FrameworkZ 1.0+"
}
function MyPlugin:Initialize()
print("[MyPlugin] Plugin initialized.")
end
FrameworkZ.Plugins:RegisterPlugin(MyPlugin)
`Initialize()` is the entry point called once when FrameworkZ loads your plugin. Put any setup logic — registering namespaces, defining items, setting up factions — in here.