diff options
Diffstat (limited to 'server/src/plugin.lua')
-rw-r--r-- | server/src/plugin.lua | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/server/src/plugin.lua b/server/src/plugin.lua index 303c2dda..7740c2d9 100644 --- a/server/src/plugin.lua +++ b/server/src/plugin.lua @@ -75,6 +75,18 @@ local function load(workspace) end) end +local function call(name, ...) + for _, plugin in ipairs(Plugins) do + if type(plugin[name]) == 'function' then + local suc, res = xpcall(plugin[name], showError, ...) + if suc and res then + return res + end + end + end +end + return { load = load, + call = call, } |