@@ -0,0 +1,1497 @@
+package com.elmakers.mine.bukkit.spell.builtin;%0A%0Aimport com.elmakers.mine.bukkit.api.spell.SpellResult;%0Aimport com.elmakers.mine.bukkit.spell.BlockSpell;%0Aimport com.elmakers.mine.bukkit.utility.Target;%0Aimport org.bukkit.block.Block;%0Aimport org.bukkit.block.BlockFace;%0Aimport org.bukkit.configuration.ConfigurationSection;%0A%0Apublic class DoorSpell extends BlockSpell%0A%7B%0A%09@Override%0A%09public SpellResult onCast(ConfigurationSection parameters) %0A%09%7B%0A%09%09Target target = getTarget();%0A%0A%09%09if (!target.hasTarget())%0A%09%09%7B%0A%09%09%09return SpellResult.NO_TARGET;%0A%09%09%7D%0A%09%09%0A%09%09Block targetBlock = target.getBlock();%0A        byte data = targetBlock.getData();%0A        if ((data & 0x8) != 0) %7B%0A            targetBlock = targetBlock.getRelative(BlockFace.DOWN);%0A        %7D%0A%0A        if (!hasBuildPermission(targetBlock))%0A        %7B%0A            return SpellResult.INSUFFICIENT_PERMISSION;%0A        %7D%0A        if (!isDestructible(targetBlock))%0A        %7B%0A            return SpellResult.NO_TARGET;%0A        %7D%0A%0A        registerForUndo(targetBlock);%0A        String type = parameters.getString(%22type%22, %22open%22);%0A        if (type.equalsIgnoreCase(%22open%22)) %7B%0A            targetBlock.setData((byte)(data %7C 0x4));%0A        %7D else if (type.equalsIgnoreCase(%22close%22)) %7B%0A            targetBlock.setData((byte)(data & ~0x4));%0A        %7D else if (type.equalsIgnoreCase(%22toggle%22)) %7B%0A            targetBlock.setData((byte)(data %5E 0x4));%0A        %7D else %7B%0A            return SpellResult.FAIL;%0A        %7D%0A%09%09%0A%09%09registerForUndo();%0A%09%09return SpellResult.CAST;%0A%09%7D%0A%7D%0A

Add DoorSpell, for opening/closing doors.