Class CommandExecuted


  • public final class CommandExecuted
    extends java.lang.Object
    An 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
      boolean equals​(java.lang.Object o)  
      java.lang.String[] getArguments()
      The command arguments that have been entered.
      java.lang.String getCommand()
      The name of the command entered.
      int hashCode()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • CommandExecuted

        public CommandExecuted​(java.lang.String command,
                               java.lang.String[] arguments)
    • 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:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object