addCommandHandler: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 4: Line 4:
|name = addCommandHandler
|name = addCommandHandler
|usage = set a function to call when a player types the specified command in-game.
|usage = set a function to call when a player types the specified command in-game.
|notes = Command names are case-insensitive.<br>If a function is already added for the command, the function is only set for the command if '''replace''' is '''bool true'''
|parameters = string command, function handler, [ bool replace = false ]
|parameters = string command, function handler, [ bool replace = false ]
|parameter1 = string command The command name to be typed in-game in the chat box.
|parameter1 = string command The command name to be typed in-game in the chat box.
Line 19: Line 18:
|callback2ParameterCS2 = string parameters The parameters string that was typed.
|callback2ParameterCS2 = string parameters The parameters string that was typed.
|notes = If replace is true, the existing callback function is replaced with the new callback function specified.
|notes = If replace is true, the existing callback function is replaced with the new callback function specified.
|note2 = Command names are case-insensitive.<br>If a function is already added for the command, the function is only set for the command if '''replace''' is '''bool true'''
|exampleJSSS = addCommandHandler('test', function(command, text, client)
|exampleJSSS = addCommandHandler('test', function(command, text, client)
{
{
6,834

edits

Navigation menu