com.nisovin.MagicSpells.Spells
Class ScrollSpell

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

public class ScrollSpell
extends CommandSpell


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
ScrollSpell(org.bukkit.util.config.Configuration config, java.lang.String spellName)
           
 
Method Summary
 boolean castFromConsole(org.bukkit.command.CommandSender sender, java.lang.String[] args)
          This method is called when the spell is cast from the console.
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 initialize()
          This method is called immediately after all spells have been loaded into the plugin.
 void onItemHeldChange(org.bukkit.event.player.PlayerItemHeldEvent event)
           
 void onPlayerInteract(org.bukkit.event.player.PlayerInteractEvent event)
           
 void turnOff()
          This methid is called when the plugin is being disabled, for any reason.
 
Methods inherited from class com.nisovin.MagicSpells.CommandSpell
canCastByCommand, canCastWithItem
 
Methods inherited from class com.nisovin.MagicSpells.Spell
addListener, cast, cast, compareTo, formatMessage, getCastItem, getConfigBoolean, getConfigInt, getConfigIntList, getConfigString, getConfigStringList, getCooldown, getCostStr, getDescription, getHealthCost, getInternalName, getManaCost, getName, getReagentCost, hasReagents, hasReagents, hasReagents, onBlockBreak, onBlockPlace, onCooldown, onEntityCombust, onEntityDamage, onEntityTarget, onExplosionPrime, onPlayerCommandPreprocess, 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

ScrollSpell

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

initialize

protected void initialize()
Description copied from class: Spell
This method is called immediately after all spells have been loaded into the plugin.

Overrides:
initialize in class Spell

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

castFromConsole

public boolean castFromConsole(org.bukkit.command.CommandSender sender,
                               java.lang.String[] args)
Description copied from class: Spell
This method is called when the spell is cast from the console.

Specified by:
castFromConsole in class CommandSpell
Parameters:
sender - the console sender.
args - the command arguments
Returns:
true if the spell was handled, false otherwise

onPlayerInteract

public void onPlayerInteract(org.bukkit.event.player.PlayerInteractEvent event)
Overrides:
onPlayerInteract in class Spell

onItemHeldChange

public void onItemHeldChange(org.bukkit.event.player.PlayerItemHeldEvent event)
Overrides:
onItemHeldChange in class Spell

turnOff

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

Overrides:
turnOff in class Spell