Search in sources :

Example 1 with BrushSpell

use of com.elmakers.mine.bukkit.spell.BrushSpell in project MagicPlugin by elBukkit.

the class CastContext method setSpell.

public void setSpell(Spell spell) {
    this.spell = spell;
    if (spell instanceof BaseSpell) {
        this.baseSpell = (BaseSpell) spell;
    }
    if (spell instanceof MageSpell) {
        MageSpell mageSpell = (MageSpell) spell;
        this.mage = mageSpell.getMage();
        this.wand = mage.getActiveWand();
        this.mageClass = (this.wand == null ? this.mage.getActiveClass() : this.wand.getMageClass());
    }
    if (spell instanceof UndoableSpell) {
        this.undoSpell = (UndoableSpell) spell;
        undoList = this.undoSpell.getUndoList();
    }
    if (spell instanceof TargetingSpell) {
        this.targetingSpell = (TargetingSpell) spell;
    }
    if (spell instanceof BlockSpell) {
        this.blockSpell = (BlockSpell) spell;
    }
    if (spell instanceof BrushSpell) {
        this.brushSpell = (BrushSpell) spell;
    }
}
Also used : BrushSpell(com.elmakers.mine.bukkit.spell.BrushSpell) BaseSpell(com.elmakers.mine.bukkit.spell.BaseSpell) MageSpell(com.elmakers.mine.bukkit.api.spell.MageSpell) TargetingSpell(com.elmakers.mine.bukkit.spell.TargetingSpell) BlockSpell(com.elmakers.mine.bukkit.spell.BlockSpell) UndoableSpell(com.elmakers.mine.bukkit.spell.UndoableSpell)

Aggregations

MageSpell (com.elmakers.mine.bukkit.api.spell.MageSpell)1 BaseSpell (com.elmakers.mine.bukkit.spell.BaseSpell)1 BlockSpell (com.elmakers.mine.bukkit.spell.BlockSpell)1 BrushSpell (com.elmakers.mine.bukkit.spell.BrushSpell)1 TargetingSpell (com.elmakers.mine.bukkit.spell.TargetingSpell)1 UndoableSpell (com.elmakers.mine.bukkit.spell.UndoableSpell)1