com.nisovin.MagicSpells.Spells
Class SafefallSpell

java.lang.Object
  extended by com.nisovin.MagicSpells.Spell
      extended by com.nisovin.MagicSpells.BuffSpell
          extended by com.nisovin.MagicSpells.Spells.SafefallSpell
All Implemented Interfaces:
java.lang.Comparable<Spell>

public class SafefallSpell
extends BuffSpell


Nested Class Summary
 
Nested classes/interfaces inherited from class com.nisovin.MagicSpells.Spell
Spell.PostCastAction, Spell.SpellCastState
 
Field Summary
 
Fields inherited from class com.nisovin.MagicSpells.BuffSpell
cancelOnRecast, duration, healthCost, manaCost, numUses, strFade, useCost, useCostInterval
 
Fields inherited from class com.nisovin.MagicSpells.Spell
broadcastRange, castItem, cooldown, cost, description, internalName, name, strCastOthers, strCastSelf, strCost
 
Constructor Summary
SafefallSpell(org.bukkit.util.config.Configuration config, java.lang.String spellName)
           
 
Method Summary
protected  Spell.PostCastAction castSpell(org.bukkit.entity.Player player, Spell.SpellCastState state, java.lang.String[] args)
          This method is called when a player casts a spell, either by command, with a wand item, or otherwise.
 void onEntityDamage(org.bukkit.event.entity.EntityDamageEvent event)
           
protected  void turnOff()
          This methid is called when the plugin is being disabled, for any reason.
protected  void turnOff(org.bukkit.entity.Player player)
          Turns off this spell for the specified player.
 
Methods inherited from class com.nisovin.MagicSpells.BuffSpell
addUse, canCastByCommand, canCastWithItem, chargeUseCost, isExpired, startSpellDuration
 
Methods inherited from class com.nisovin.MagicSpells.Spell
addListener, cast, cast, castFromConsole, compareTo, formatMessage, getCastItem, getConfigBoolean, getConfigInt, getConfigIntList, getConfigString, getConfigStringList, getCooldown, getCostStr, getDescription, getHealthCost, getInternalName, getManaCost, getName, getReagentCost, hasReagents, hasReagents, hasReagents, initialize, onBlockBreak, onBlockPlace, onCooldown, onEntityCombust, onEntityTarget, onExplosionPrime, onItemHeldChange, onPlayerCommandPreprocess, onPlayerInteract, onPlayerJoin, onPlayerMove, onPlayerQuit, onPlayerTeleport, onPlayerToggleSneak, removeListener, removeReagents, removeReagents, removeReagents, sendMessage, sendMessage, sendMessageNear, sendMessageNear, setCooldown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SafefallSpell

public SafefallSpell(org.bukkit.util.config.Configuration config,
                     java.lang.String spellName)
Method Detail

castSpell

protected Spell.PostCastAction castSpell(org.bukkit.entity.Player player,
                                         Spell.SpellCastState state,
                                         java.lang.String[] args)
Description copied from class: Spell
This method is called when a player casts a spell, either by command, with a wand item, or otherwise.

Specified by:
castSpell in class Spell
Parameters:
player - the player casting the spell
state - the state of the spell cast (normal, on cooldown, missing reagents, etc)
args - the spell arguments, if cast by command
Returns:
the action to take after the spell is processed

onEntityDamage

public void onEntityDamage(org.bukkit.event.entity.EntityDamageEvent event)
Overrides:
onEntityDamage in class Spell

turnOff

protected void turnOff(org.bukkit.entity.Player player)
Description copied from class: BuffSpell
Turns off this spell for the specified player. This can be called from many situations, including when the spell expires or the uses run out. When overriding this function, you should always be sure to call super.turnOff(player).

Overrides:
turnOff in class BuffSpell

turnOff

protected void turnOff()
Description copied from class: Spell
This methid is called when the plugin is being disabled, for any reason.

Specified by:
turnOff in class BuffSpell