Class KitGiveEvent
java.lang.Object
org.bukkit.event.Event
net.godlycow.org.essc.api.kit.event.KitGiveEvent
- All Implemented Interfaces:
org.bukkit.event.Cancellable
public class KitGiveEvent
extends org.bukkit.event.Event
implements org.bukkit.event.Cancellable
Fired when kit items are about to be given to a player.
Cancelling this event blocks the item grant. Use setItems(List) to
modify which items are handed out.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result -
Constructor Summary
ConstructorsConstructorDescriptionKitGiveEvent(org.bukkit.entity.Player player, Kit kit, List<org.bukkit.inventory.ItemStack> items) Creates a new kit give event. -
Method Summary
Modifier and TypeMethodDescriptionstatic org.bukkit.event.HandlerListorg.bukkit.event.HandlerListList<org.bukkit.inventory.ItemStack> getItems()Returns a copy of the items about to be given.getKit()Returns the kit being granted.org.bukkit.entity.PlayerReturns the receiving player.booleanvoidsetCancelled(boolean cancel) voidReplaces the items that will be given.Methods inherited from class org.bukkit.event.Event
callEvent, getEventName, isAsynchronous
-
Constructor Details
-
Method Details
-
getPlayer
public org.bukkit.entity.Player getPlayer()Returns the receiving player.- Returns:
- the player
-
getKit
Returns the kit being granted.- Returns:
- the kit
-
getItems
Returns a copy of the items about to be given.- Returns:
- the items
-
setItems
Replaces the items that will be given.- Parameters:
items- the new items
-
isCancelled
public boolean isCancelled()- Specified by:
isCancelledin interfaceorg.bukkit.event.Cancellable
-
setCancelled
public void setCancelled(boolean cancel) - Specified by:
setCancelledin interfaceorg.bukkit.event.Cancellable
-
getHandlers
public org.bukkit.event.HandlerList getHandlers()- Specified by:
getHandlersin classorg.bukkit.event.Event
-
getHandlerList
public static org.bukkit.event.HandlerList getHandlerList()
-