com.nisovin.MagicSpells.Spells
Class SummonSpell

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

public class SummonSpell
extends ChanneledSpell


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.Spell
broadcastRange, castItem, cooldown, cost, description, healthCost, internalName, manaCost, name, strCastOthers, strCastSelf, strCost
 
Constructor Summary
SummonSpell(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.
protected  void finishSpell(java.lang.String key, org.bukkit.Location location)
          This method is called when the number of channelers for the session meets the required amount, and the spell is ready to perform its action.
 void onPlayerCommandPreprocess(org.bukkit.event.player.PlayerCommandPreprocessEvent event)
           
 
Methods inherited from class com.nisovin.MagicSpells.ChanneledSpell
addChanneler, canCastByCommand, canCastWithItem, getChannelerCount, onPlayerMove, onPlayerQuit
 
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, onEntityDamage, onEntityTarget, onExplosionPrime, onItemHeldChange, onPlayerInteract, onPlayerJoin, onPlayerTeleport, onPlayerToggleSneak, removeListener, removeReagents, removeReagents, removeReagents, sendMessage, sendMessage, sendMessageNear, sendMessageNear, setCooldown, turnOff
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SummonSpell

public SummonSpell(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

finishSpell

protected void finishSpell(java.lang.String key,
                           org.bukkit.Location location)
Description copied from class: ChanneledSpell
This method is called when the number of channelers for the session meets the required amount, and the spell is ready to perform its action.

Specified by:
finishSpell in class ChanneledSpell
Parameters:
key - the name of the channeling session
location - the location of the first channeling player

onPlayerCommandPreprocess

public void onPlayerCommandPreprocess(org.bukkit.event.player.PlayerCommandPreprocessEvent event)
Overrides:
onPlayerCommandPreprocess in class Spell