001 package org.bukkit.event.inventory; 002 003 import org.bukkit.event.inventory.InventoryType.SlotType; 004 import org.bukkit.inventory.InventoryView; 005 import org.bukkit.inventory.ItemStack; 006 007 /** 008 * This event is called when a player in creative mode puts down or picks up 009 * an item in their inventory / hotbar and when they drop items from their 010 * Inventory while in creative mode. 011 */ 012 public class InventoryCreativeEvent extends InventoryClickEvent { 013 private ItemStack item; 014 015 public InventoryCreativeEvent(InventoryView what, SlotType type, int slot, ItemStack newItem) { 016 super(what, type, slot, ClickType.CREATIVE, InventoryAction.PLACE_ALL); 017 this.item = newItem; 018 } 019 020 public ItemStack getCursor() { 021 return item; 022 } 023 024 public void setCursor(ItemStack item) { 025 this.item = item; 026 } 027 }