// Sets the spell that's cast when it is right clicked. public void setQuickSpell(String quickSpell, SpellActions action) { // Checks to see if it exists for (Spell spell : GeneralData.spells) { if (spell.getName().equalsIgnoreCase(quickSpell)) { String[] splitted = this.quickSpell.split(","); splitted[action.getIndex()] = quickSpell; this.quickSpell = Utils.concatStringArray(splitted, ","); } } }
public String getQuickSpell(SpellActions action) { return quickSpell.split(",")[action.getIndex()]; }