Interface IMagicAPI


  • public interface IMagicAPI
    • Method Detail

      • isSpellSelected

        boolean isSpellSelected()
        Gets whether or not a spell is selected in the magic tab.
        Returns:
        true if a spell is selected, false otherwise
      • getAutoCastSpell

        Spell getAutoCastSpell()
        Gets the selected auto casting spell.
        Returns:
        the spell or null if no spell is selected to be auto casted
      • canCast

        boolean canCast​(Spell spell)
        Returns whether or not the given spell can be cast.
        Parameters:
        spell - the spell, e.g. Spell.Modern.WIND_STRIKE
        Returns:
        true if the spell can be cast, false otherwise
      • cast

        boolean cast​(Spell spell)
        Selects the "Cast" menu action on the spell widget.
        Parameters:
        spell - the spell
        Returns:
        true if the spell was cast/selected, false otherwise
      • cast

        boolean cast​(Spell spell,
                     java.lang.String action)
        Selects the given menu action on the spell widget.
        Parameters:
        spell - the spell
        action - the action
        Returns:
        true if the spell was cast/selected, false otherwise
      • setAutoCast

        boolean setAutoCast​(Spell spell,
                            boolean defensive)
        Sets the given spell to be auto casted.
        Parameters:
        spell - the spell to be auto casted
        defensive - whether to cast defensively
        Returns:
        true if the spell was selected for auto cast successfully, false otherwise
      • getCurrentSpellBook

        Spell.Book getCurrentSpellBook()
        Gets the currently active spell book.
        Returns:
        the spell book