com.mineblown.challengescript.scripting.event
Class ScriptNPCDamageEvent

java.lang.Object
  extended by com.mineblown.challengescript.scripting.event.ScriptCancellableEvent
      extended by com.mineblown.challengescript.scripting.event.ScriptNPCDamageEvent

public class ScriptNPCDamageEvent
extends ScriptCancellableEvent


Constructor Summary
ScriptNPCDamageEvent(ScriptNPC inNPC, ScriptPlayer inDamager, int inDamage)
           
 
Method Summary
 int getDamage()
          Gets the damage dealt by the damager
 ScriptPlayer getDamager()
          Gets the player who damaged the NPC
 ScriptNPC getNPC()
          Gets the NPC that has been damaged
 void setDamage(int inDamage)
          Sets the damage dealt to the NPC
 
Methods inherited from class com.mineblown.challengescript.scripting.event.ScriptCancellableEvent
isCancelled, setCancelled
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScriptNPCDamageEvent

public ScriptNPCDamageEvent(ScriptNPC inNPC,
                            ScriptPlayer inDamager,
                            int inDamage)
Method Detail

getNPC

public ScriptNPC getNPC()
Gets the NPC that has been damaged

Returns:
damaged NPC

getDamage

public int getDamage()
Gets the damage dealt by the damager

Returns:
damage

setDamage

public void setDamage(int inDamage)
Sets the damage dealt to the NPC

Parameters:
inDamage - new damage

getDamager

public ScriptPlayer getDamager()
Gets the player who damaged the NPC

Returns:
who dealt the damage