1
0

OnExecuteCommand hook can override the command result (crXXX).

This commit is contained in:
Mattes D
2015-05-10 23:11:30 +02:00
parent 693ffb689c
commit dd10ffb63a
8 changed files with 40 additions and 20 deletions

View File

@@ -28,9 +28,11 @@ return
{ Name = "EntireCommand", Type = "string", Notes = "The entire command as a single string" },
},
Returns = [[
If the plugin returns true, the command will be blocked and none of the remaining hook handlers will
be called. If the plugin returns false, MCServer calls all the remaining hook handlers and finally
the command will be executed.
If the plugin returns false, MCServer calls all the remaining hook handlers and finally the command
will be executed. If the plugin returns true, the none of the remaining hook handlers will be called.
In this case the plugin can return a second value, specifying whether what the command result should
be set to, one of the {{cPluginManager#CommandResult|CommandResult}} constants. If not
provided, the value defaults to crBlocked.
]],
}, -- HOOK_EXECUTE_COMMAND
}