Package org.bukkit.event.inventory
Class InventoryCreativeEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.inventory.InventoryEvent
org.bukkit.event.inventory.InventoryInteractEvent
org.bukkit.event.inventory.InventoryClickEvent
org.bukkit.event.inventory.InventoryCreativeEvent
- All Implemented Interfaces:
Cancellable
public class InventoryCreativeEvent extends InventoryClickEvent
This event is called when a player in creative mode puts down or picks up
an item in their inventory / hotbar and when they drop items from their
Inventory while in creative mode.
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
Constructors Constructor Description InventoryCreativeEvent(InventoryView what, InventoryType.SlotType type, int slot, ItemStack newItem)
-
Method Summary
Methods inherited from class org.bukkit.event.inventory.InventoryClickEvent
getAction, getClick, getClickedInventory, getCurrentItem, getHandlerList, getHandlers, getHotbarButton, getRawSlot, getSlot, getSlotType, isLeftClick, isRightClick, isShiftClick, setCurrentItem
Methods inherited from class org.bukkit.event.inventory.InventoryInteractEvent
getResult, getWhoClicked, isCancelled, setCancelled, setResult
Methods inherited from class org.bukkit.event.inventory.InventoryEvent
getInventory, getView, getViewers
-
Constructor Details
-
InventoryCreativeEvent
public InventoryCreativeEvent(@NotNull InventoryView what, @NotNull InventoryType.SlotType type, int slot, @NotNull ItemStack newItem)
-
-
Method Details
-
getCursor
Description copied from class:InventoryClickEvent
Gets the current ItemStack on the cursor.- Overrides:
getCursor
in classInventoryClickEvent
- Returns:
- the cursor ItemStack
-
setCursor
Description copied from class:InventoryClickEvent
Sets the item on the cursor.- Overrides:
setCursor
in classInventoryClickEvent
- Parameters:
item
- the new cursor item
-