@@ -0,0 +1,1758 @@
+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.spell.Spell;%0Aimport com.elmakers.mine.bukkit.api.spell.SpellResult;%0Aimport com.elmakers.mine.bukkit.spell.BaseSpell;%0Aimport org.bukkit.configuration.ConfigurationSection;%0Aimport org.bukkit.entity.LivingEntity;%0A%0Aimport java.util.Arrays;%0Aimport java.util.Collection;%0A%0Apublic class AirSupplyAction extends BaseSpellAction%0A%7B%0A    private int air;%0A%0A    @Override%0A    public void prepare(CastContext context, ConfigurationSection parameters)%0A    %7B%0A        super.prepare(context, parameters);%0A        air = parameters.getInt(%22air%22, 0);%0A    %7D%0A%0A%09@Override%0A%09public SpellResult perform(CastContext context)%0A%09%7B%0A%09%09LivingEntity livingEntity = context.getLivingEntity();%0A%09%09if (livingEntity == null) %7B%0A%09%09%09return SpellResult.NO_TARGET;%0A%09%09%7D%0A%0A%09%09int airLevel = air;%0A%09%09if (airLevel %3E livingEntity.getMaximumAir()) %7B%0A%09%09%09airLevel = livingEntity.getMaximumAir();%0A%09%09%7D%0A%09%09context.registerModified(livingEntity);%0A%09%09livingEntity.setRemainingAir(airLevel);%0A%09%09return SpellResult.CAST;%0A%09%7D%0A%0A%09@Override%0A%09public boolean isUndoable()%0A%09%7B%0A%09%09return true;%0A%09%7D%0A%0A    @Override%0A    public boolean requiresTargetEntity()%0A    %7B%0A        return true;%0A    %7D%0A%0A%09@Override%0A%09public void getParameterNames(Spell spell, Collection%3CString%3E parameters) %7B%0A%09%09super.getParameterNames(spell, parameters);%0A%09%09parameters.add(%22air%22);%0A%09%7D%0A%0A%09@Override%0A%09public void getParameterOptions(Spell spell, String parameterKey, Collection%3CString%3E examples) %7B%0A%09%09if (parameterKey.equals(%22air%22)) %7B%0A%09%09%09examples.addAll(Arrays.asList((BaseSpell.EXAMPLE_SIZES)));%0A%09%09%7D else %7B%0A%09%09%09super.getParameterOptions(spell, parameterKey, examples);%0A%09%09%7D%0A%09%7D%0A%7D%0A

Add AirSupplyAction