Package net.runelite.api.events
Class CommandExecuted
- java.lang.Object
-
- net.runelite.api.events.CommandExecuted
-
public final class CommandExecuted extends java.lang.ObjectAn event where a command has been used in the chat.Commands are triggered by using the "::" prefix before a chat message. The structure of a command is "::[name] [args..]" where "[name]" is the name of the command that is set in the command field, and args are (optional) words entered that are separated by spaces.
Typing in "::" with no additional characters will treat the message as normal and pass it along to the public chat.
Note that having a space as the first character after the command trigger will set the command field to an empty string. For example, the message ":: hello world!" will set command to "" and arguments to ["hello", "world!"].
-
-
Constructor Summary
Constructors Constructor Description CommandExecuted(java.lang.String command, java.lang.String[] arguments)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)java.lang.String[]getArguments()The command arguments that have been entered.java.lang.StringgetCommand()The name of the command entered.inthashCode()java.lang.StringtoString()
-
-
-
Method Detail
-
getCommand
public java.lang.String getCommand()
The name of the command entered.
-
getArguments
public java.lang.String[] getArguments()
The command arguments that have been entered.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-