Class ShortcutSpell

    • Constructor Detail

      • ShortcutSpell

        public ShortcutSpell​(@NotNull
                             @NotNull CommandQueue commandQueue,
                             @NotNull
                             @NotNull Spell spell)
        Creates a new instance.
        Parameters:
        commandQueue - the command queue for executing commands
        spell - the spell to cast
    • Method Detail

      • getSpell

        @NotNull
        public @NotNull Spell getSpell()
        Returns the spell to cast.
        Returns:
        the spell
      • isCast

        public boolean isCast()
        Returns whether the spell should be "cast" or "invoked".
        Returns:
        true for "cast", or false for "invoke"
      • setCast

        public void setCast​(boolean cast)
        Sets whether the spell should be "cast" or "invoked".
        Parameters:
        cast - true for "cast", or false for "invoke"
      • 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