Examples
Command Options
plugin.addCommand({name="command", description="Execute the command /command", usage="/command", permission="commands.command", permissionMessage="You cannot execute /command", maxArgs=0, minArgs=0, runAsync=false}, function(commandEvent)
commandEvent.getSender():sendMessage("You executed /" .. commandEvent.getCommand());
end)Arguments
plugin.addCommand({name="command", description="Execute the command /command", usage="/command <message>", minArgs=1}, function(commandEvent)
commandEvent.getSender():sendMessage("You executed /" .. commandEvent.getCommand() .. " with the message: " .. commandEvent.getArgs()[1])
end)Last updated