Class Magic


  • public class Magic
    extends java.lang.Object
    Created by Pandemic
    • Constructor Detail

      • Magic

        @Deprecated
        public Magic()
        Deprecated.
    • Method Detail

      • getMagic

        @Deprecated
        public static Magic getMagic()
        Deprecated.
      • interact

        public static boolean interact​(Spell spell,
                                       java.lang.String action)
        Interacts with the spell with the given action
        Parameters:
        spell - spell to be cast
        action - the action to perform on the spell widget
        Returns:
        true if successfully interacted with the spell
      • castSpell

        public static boolean castSpell​(Spell spell)
        Casts a spell
        Parameters:
        spell - spell to be cast
        Returns:
        true if successfully clicked on spell
      • castSpellOn

        public static boolean castSpellOn​(Spell spell,
                                          Entity entity)
        Casts a spell on an entity
        Parameters:
        spell - spell to be cast
        entity - entity to cast spell on
        Returns:
        true if successfully cast spell on entity
      • isSpellSelected

        public static boolean isSpellSelected()
        Checks if a spell is currently selected
        Returns:
        True if a spell is selected, false if not
      • getSelectedSpellName

        public static java.lang.String getSelectedSpellName()
        Gets the currently selected spell name
        Returns:
        Spell name if spell selected, otherwise null
      • canCast

        public static boolean canCast​(Spell spell)
        Checks if you can cast the given spell. Does account for any staffs equipped.
        Parameters:
        spell - The spell to check
        Returns:
        true if you have the level requirement and costs to cast the spell, otherwise false
      • deselect

        public static boolean deselect()
        Deselects the current spell if one is selected
        Returns:
        true if successfully deselected spell or if no spell was selected to being with
      • getAutocastSpell

        public static Spell getAutocastSpell()
        Gets the active spell that is selected via autocast
        Returns:
        Spell if one is selected, null otherwise
      • setAutocastSpell

        public static boolean setAutocastSpell​(Spell spell)