FrameworkZ 10.8.3
Provides a framework for Project Zomboid with various systems.
Loading...
Searching...
No Matches
FrameworkZ::Plugins Class Reference

Plugins module for FrameworkZ. Extends the framework with modular plugins. More...

Public Member Functions

void AddEventHandler (eventName)
 Add a new event handler to the list.
 
void CreatePlugin (name)
 
void ExecuteCommand (commandName,...)
 Execute a custom command.
 
void ExecutePluginHook (hookName,...)
 Execute a hook for all loaded plugins.
 
void GetPlugin (pluginName)
 
void LoadPlugin (pluginName)
 Load a registered plugin.
 
void Log (message)
 Log a message for debugging purposes.
 
void RegisterCommand (commandName, callback)
 Register a custom command for a plugin.
 
void RegisterPlugin (plugin, overwrite)
 Register a plugin.
 
void RegisterPluginEventHandlers (plugin)
 Register event handlers for a plugin.
 
void RemoveEventHandler (eventName)
 Remove an event handler from the list.
 
void UnloadPlugin (pluginName)
 Unload a loaded plugin.
 
void UnregisterPluginEventHandlers (plugin)
 Unregister event handlers for a plugin.
 
void UnregisterPluginHook (pluginName, hookName)
 Unregister a specific hook for a plugin.
 

Data Fields

FrameworkZ Plugins __index
 
FrameworkZ Plugins BasePlugin __index
 
FrameworkZ Plugins BasePlugin
 
FrameworkZ Plugins Commands
 
FrameworkZ Plugins EventHandlers
 
FrameworkZ Plugins LoadedPlugins
 
FrameworkZ Plugins
 
FrameworkZ Plugins RegisteredPlugins
 

Detailed Description

Plugins module for FrameworkZ. Extends the framework with modular plugins.

Definition at line 5 of file Plugins.lua.

Member Function Documentation

◆ AddEventHandler()

void AddEventHandler ( eventName )

Add a new event handler to the list.

Parameters
eventNamestring The name of the event handler to add.

◆ CreatePlugin()

void CreatePlugin ( name )

◆ ExecuteCommand()

void ExecuteCommand ( commandName ,
... )

Execute a custom command.

Parameters
commandNamestring The name of the command.
...\vararg Additional arguments to pass to the command function.

◆ ExecutePluginHook()

void ExecutePluginHook ( hookName ,
... )

Execute a hook for all loaded plugins.

Parameters
hookNamestring The name of the hook to execute.
...\vararg Additional arguments to pass to the hook functions.

◆ GetPlugin()

void GetPlugin ( pluginName )

◆ LoadPlugin()

void LoadPlugin ( pluginName )

Load a registered plugin.

Parameters
pluginNamestring The name of the plugin to load.

◆ Log()

void Log ( message )

Log a message for debugging purposes.

Parameters
messagestring The message to log.

◆ RegisterCommand()

void RegisterCommand ( commandName ,
callback  )

Register a custom command for a plugin.

Parameters
commandNamestring The name of the command.
callbackfunction The function to call when the command is executed.

◆ RegisterPlugin()

void RegisterPlugin ( plugin ,
overwrite  )

Register a plugin.

Parameters
pluginNamestring The name of the plugin.
pluginTabletable The table containing the plugin's functions and data.
metadatatable Optional metadata for the plugin.

◆ RegisterPluginEventHandlers()

void RegisterPluginEventHandlers ( plugin )

Register event handlers for a plugin.

Parameters
plugintable The plugin table containing the functions.

◆ RemoveEventHandler()

void RemoveEventHandler ( eventName )

Remove an event handler from the list.

Parameters
eventNamestring The name of the event handler to remove.

◆ UnloadPlugin()

void UnloadPlugin ( pluginName )

Unload a loaded plugin.

Parameters
pluginNamestring The name of the plugin to unload.

◆ UnregisterPluginEventHandlers()

void UnregisterPluginEventHandlers ( plugin )

Unregister event handlers for a plugin.

Parameters
plugintable The plugin table containing the functions.

◆ UnregisterPluginHook()

void UnregisterPluginHook ( pluginName ,
hookName  )

Unregister a specific hook for a plugin.

Parameters
pluginNamestring The name of the plugin.
hookNamestring The name of the hook to unregister.

Field Documentation

◆ __index [1/2]

Definition at line 7 of file Plugins.lua.

◆ __index [2/2]

Definition at line 21 of file Plugins.lua.

◆ BasePlugin

FrameworkZ Plugins BasePlugin

Definition at line 19 of file Plugins.lua.

◆ Commands

FrameworkZ Plugins Commands

Definition at line 11 of file Plugins.lua.

◆ EventHandlers

FrameworkZ Plugins EventHandlers

Definition at line 15 of file Plugins.lua.

◆ LoadedPlugins

FrameworkZ Plugins LoadedPlugins

Definition at line 13 of file Plugins.lua.

◆ Plugins

Definition at line 17 of file Plugins.lua.

◆ RegisteredPlugins

FrameworkZ Plugins RegisteredPlugins

Definition at line 9 of file Plugins.lua.


The documentation for this class was generated from the following file: