Class ShortcutCommand


  • public class ShortcutCommand
    extends Shortcut
    A Shortcut that executes a Crossfire command.
    • Constructor Detail

      • ShortcutCommand

        public ShortcutCommand​(@NotNull
                               @NotNull CommandQueue commandQueue,
                               @NotNull
                               @NotNull java.lang.String command)
        Creates a new instance.
        Parameters:
        commandQueue - the command queue for sending commands
        command - the command to execute
    • Method Detail

      • getCommand

        @NotNull
        public @NotNull java.lang.String getCommand()
        Returns the command to execute.
        Returns:
        the command
      • dispose

        public void dispose()
        Description copied from class: Shortcut
        Releases all allocated resources.
        Specified by:
        dispose in class Shortcut
      • execute

        public void execute()
        Description copied from class: Shortcut
        Executes the shortcut.
        Specified by:
        execute in class Shortcut
      • getTooltipText

        @NotNull
        public @NotNull java.lang.String getTooltipText()
        Description copied from class: Shortcut
        Returns the current tooltip text.
        Specified by:
        getTooltipText in class Shortcut
        Returns:
        the tooltip text
      • visit

        public void visit​(@NotNull
                          @NotNull ShortcutVisitor visitor)
        Description copied from class: Shortcut
        Calls a ShortcutVisitor's visit() function for this instance.
        Specified by:
        visit in class Shortcut
        Parameters:
        visitor - the visitor to call
      • displaysFace

        public boolean displaysFace​(Face face)
        Description copied from class: Shortcut
        Returns whether this shortcut displays the given face.
        Specified by:
        displaysFace in class Shortcut
        Parameters:
        face - the face to check for
        Returns:
        whether the face is displayed