@@ -0,0 +1,1145 @@
+package com.elmakers.mine.bukkit.action.builtin;%0A%0Aimport com.elmakers.mine.bukkit.action.BaseSpellAction;%0Aimport com.elmakers.mine.bukkit.api.action.CastContext;%0Aimport com.elmakers.mine.bukkit.api.magic.Mage;%0Aimport com.elmakers.mine.bukkit.api.spell.SpellResult;%0Aimport com.elmakers.mine.bukkit.api.wand.Wand;%0Aimport com.elmakers.mine.bukkit.api.wand.WandUpgradePath;%0A%0Apublic class UpgradePathAction extends BaseSpellAction %7B%0A%0A    @Override%0A    public SpellResult perform(CastContext context) %7B%0A        Mage mage = context.getMage();%0A        Wand wand = mage.getActiveWand();%0A%0A        // For now... eventually I need to separate out the wand part, but not doing it now.%0A        if (wand == null) %7B%0A            return SpellResult.NO_TARGET;%0A        %7D%0A%0A        com.elmakers.mine.bukkit.api.wand.WandUpgradePath path = wand.getPath();%0A        WandUpgradePath nextPath = path != null ? path.getUpgrade() : null;%0A        if (nextPath != null && path.checkUpgradeRequirements(wand, null) && !path.canEnchant(wand)) %7B%0A            path.upgrade(wand, mage);%0A            return SpellResult.CAST;%0A        %7D%0A%0A        return SpellResult.NO_TARGET;%0A    %7D%0A%7D%0A

Add UpgradePath action