CommandTrigger

class CommandTrigger(method: Any, loader: ILoader) : Trigger

Functions

Link copied to clipboard
fun setAliases(vararg args: String): CommandTrigger

Sets the aliases for the command.

Link copied to clipboard
fun setCommandName(commandName: String, overrideExisting: Boolean = false): CommandTrigger

Sets the command name. Example: setCommandName("test") would result in the command being /test

Link copied to clipboard
fun setName(commandName: String, overrideExisting: Boolean = false): CommandTrigger

Alias for setCommandName

Link copied to clipboard
fun setTabCompletions(vararg args: String): CommandTrigger

Sets the tab completion options for the command. This method must be used before setting the command name, otherwise, the tab completions will not be set.

fun setTabCompletions(callback: (Array<out String>) -> MutableList<String>): CommandTrigger

This sets the possible tab completions for the command. This method must be used before setting the command name, otherwise, the tab completions will not be set.

Link copied to clipboard
open override fun trigger(args: Array<out Any?>)

Sources

Link copied to clipboard