mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-30 12:31:41 +09:00
Fixed Command Middleware Bug
This commit is contained in:
@@ -209,7 +209,7 @@ local function run_custom_command(command)
|
||||
local player = Game.get_player(command) or SERVER
|
||||
-- runs all middle ware if any, if there is no middle where then it relyis on .default_admin_only
|
||||
if #middleware > 0 then for _,callback in pairs(middleware) do
|
||||
local success, err = pcall(callback,player_name,command.name,command)
|
||||
local success, err = pcall(callback,player,command.name,command)
|
||||
if not success then error(err)
|
||||
elseif not err then
|
||||
player_return({'ExpGamingCore_Command.unauthorized'},defines.textcolor.crit)
|
||||
|
||||
Reference in New Issue
Block a user