com.amoebaman.kitmaster.objects
Class GiveKitEvent

java.lang.Object
  extended by org.bukkit.event.Event
      extended by com.amoebaman.kitmaster.objects.GiveKitEvent
All Implemented Interfaces:
org.bukkit.event.Cancellable

public class GiveKitEvent
extends org.bukkit.event.Event
implements org.bukkit.event.Cancellable

An event that is called whenever a kit is given to a player.

Author:
Dennison

Nested Class Summary
 
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result
 
Constructor Summary
GiveKitEvent(org.bukkit.entity.Player player, Kit kit, GiveKitContext context)
          Should not be used.
 
Method Summary
 void callEvent()
          Calls this event, sending it through the Bukkit event system and giving other plugins the chance to modify it.
 GiveKitContext getContext()
          Gets the context/reason for this kit being given.
static org.bukkit.event.HandlerList getHandlerList()
           
 org.bukkit.event.HandlerList getHandlers()
           
 Kit getKit()
          Gets the kit involved in this event.
 org.bukkit.entity.Player getPlayer()
          Gets the player involved in this event.
 boolean isCancelled()
           
 void setCancelled(boolean cancel)
           
 void setKit(Kit newKit)
          Replaces the kit to be given with a new or modified one.
 
Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GiveKitEvent

public GiveKitEvent(org.bukkit.entity.Player player,
                    Kit kit,
                    GiveKitContext context)
Should not be used. This event is created and called automatically whenever a kit is given/taken.

Parameters:
player -
kit -
context -
Method Detail

getPlayer

public org.bukkit.entity.Player getPlayer()
Gets the player involved in this event.

Returns:
The player.

getKit

public Kit getKit()
Gets the kit involved in this event.

Returns:
The kit.

getContext

public GiveKitContext getContext()
Gets the context/reason for this kit being given.

Returns:
The context.

setKit

public void setKit(Kit newKit)
Replaces the kit to be given with a new or modified one.

Parameters:
newKit - The new kit that will be given.

getHandlers

public org.bukkit.event.HandlerList getHandlers()
Specified by:
getHandlers in class org.bukkit.event.Event

getHandlerList

public static org.bukkit.event.HandlerList getHandlerList()

callEvent

public void callEvent()
Calls this event, sending it through the Bukkit event system and giving other plugins the chance to modify it.


isCancelled

public boolean isCancelled()
Specified by:
isCancelled in interface org.bukkit.event.Cancellable

setCancelled

public void setCancelled(boolean cancel)
Specified by:
setCancelled in interface org.bukkit.event.Cancellable