![]() |
Bukkit
1.4.7-R1.0
|
Inheritance diagram for org.bukkit.event.inventory.InventoryClickEvent:
Collaboration diagram for org.bukkit.event.inventory.InventoryClickEvent:Public Member Functions | |
| InventoryClickEvent (InventoryView what, SlotType type, int slot, boolean right, boolean shift) | |
| SlotType | getSlotType () |
| Get the type of slot that was clicked. | |
| ItemStack | getCursor () |
| Get the current item on the cursor. | |
| ItemStack | getCurrentItem () |
| Get the current item in the clicked slot. | |
| boolean | isRightClick () |
| boolean | isLeftClick () |
| boolean | isShiftClick () |
| Shift can be combined with right-click or left-click as a modifier. | |
| void | setResult (Result newResult) |
| Result | getResult () |
| HumanEntity | getWhoClicked () |
| Get the player who performed the click. | |
| void | setCursor (ItemStack what) |
| Set the item on the cursor. | |
| void | setCurrentItem (ItemStack what) |
| Set the current item in the slot. | |
| boolean | isCancelled () |
| void | setCancelled (boolean toCancel) |
| int | getSlot () |
| The slot number that was clicked, ready for passing to Inventory#getItem(int). | |
| int | getRawSlot () |
| The raw slot number, which is unique for the view. | |
| HandlerList | getHandlers () |
Public Member Functions inherited from org.bukkit.event.inventory.InventoryEvent | |
| InventoryEvent (InventoryView transaction) | |
| Inventory | getInventory () |
| Gets the primary Inventory involved in this transaction. | |
| List< HumanEntity > | getViewers () |
| Gets the list of players viewing the primary (upper) inventory involved in this event. | |
| InventoryView | getView () |
| Gets the view object itself. | |
| HandlerList | getHandlers () |
Public Member Functions inherited from org.bukkit.event.Event | |
| Event () | |
| The default constructor is defined for cleaner code. | |
| Event (boolean isAsync) | |
| This constructor is used to explicitly declare an event as synchronous or asynchronous. | |
| String | getEventName () |
| final boolean | isAsynchronous () |
| Any custom event that should not by synchronized with other events must use the specific constructor. | |
Public Member Functions inherited from org.bukkit.event.Cancellable | |
| boolean | isCancelled () |
| Gets the cancellation state of this event. | |
| void | setCancelled (boolean cancel) |
| Sets the cancellation state of this event. | |
Static Public Member Functions | |
| static HandlerList | getHandlerList () |
Static Public Member Functions inherited from org.bukkit.event.inventory.InventoryEvent | |
| static HandlerList | getHandlerList () |
Additional Inherited Members | |
Protected Attributes inherited from org.bukkit.event.inventory.InventoryEvent | |
| InventoryView | transaction |
Definition at line 11 of file InventoryClickEvent.java.
| org.bukkit.event.inventory.InventoryClickEvent.InventoryClickEvent | ( | InventoryView | what, |
| SlotType | type, | ||
| int | slot, | ||
| boolean | right, | ||
| boolean | shift | ||
| ) |
Definition at line 20 of file InventoryClickEvent.java.
References org.bukkit.inventory.InventoryView.convertSlot(), and org.bukkit.event.Event.Result.DEFAULT.
| ItemStack org.bukkit.event.inventory.InventoryClickEvent.getCurrentItem | ( | ) |
Get the current item in the clicked slot.
Definition at line 50 of file InventoryClickEvent.java.
References org.bukkit.inventory.InventoryView.getItem(), org.bukkit.event.inventory.InventoryEvent.getView(), and org.bukkit.event.inventory.InventoryType.SlotType.OUTSIDE.
| ItemStack org.bukkit.event.inventory.InventoryClickEvent.getCursor | ( | ) |
Get the current item on the cursor.
Definition at line 42 of file InventoryClickEvent.java.
References org.bukkit.inventory.InventoryView.getCursor(), and org.bukkit.event.inventory.InventoryEvent.getView().
|
static |
Definition at line 140 of file InventoryClickEvent.java.
|
virtual |
Implements org.bukkit.event.Event.
Definition at line 136 of file InventoryClickEvent.java.
| int org.bukkit.event.inventory.InventoryClickEvent.getRawSlot | ( | ) |
The raw slot number, which is unique for the view.
Definition at line 131 of file InventoryClickEvent.java.
| Result org.bukkit.event.inventory.InventoryClickEvent.getResult | ( | ) |
Definition at line 81 of file InventoryClickEvent.java.
| int org.bukkit.event.inventory.InventoryClickEvent.getSlot | ( | ) |
The slot number that was clicked, ready for passing to Inventory#getItem(int).
Note that there may be two slots with the same slot number, since a view links two different inventories.
Definition at line 123 of file InventoryClickEvent.java.
| SlotType org.bukkit.event.inventory.InventoryClickEvent.getSlotType | ( | ) |
Get the type of slot that was clicked.
Definition at line 34 of file InventoryClickEvent.java.
| HumanEntity org.bukkit.event.inventory.InventoryClickEvent.getWhoClicked | ( | ) |
Get the player who performed the click.
Definition at line 89 of file InventoryClickEvent.java.
References org.bukkit.inventory.InventoryView.getPlayer(), and org.bukkit.event.inventory.InventoryEvent.getView().
| boolean org.bukkit.event.inventory.InventoryClickEvent.isCancelled | ( | ) |
Definition at line 110 of file InventoryClickEvent.java.
References org.bukkit.event.Event.Result.DENY.
| boolean org.bukkit.event.inventory.InventoryClickEvent.isLeftClick | ( | ) |
Definition at line 65 of file InventoryClickEvent.java.
| boolean org.bukkit.event.inventory.InventoryClickEvent.isRightClick | ( | ) |
Definition at line 58 of file InventoryClickEvent.java.
| boolean org.bukkit.event.inventory.InventoryClickEvent.isShiftClick | ( | ) |
Shift can be combined with right-click or left-click as a modifier.
Definition at line 73 of file InventoryClickEvent.java.
| void org.bukkit.event.inventory.InventoryClickEvent.setCancelled | ( | boolean | toCancel | ) |
Definition at line 114 of file InventoryClickEvent.java.
References org.bukkit.event.Event.Result.ALLOW, and org.bukkit.event.Event.Result.DENY.
| void org.bukkit.event.inventory.InventoryClickEvent.setCurrentItem | ( | ItemStack | what | ) |
Set the current item in the slot.
| what | The new slot item. |
Definition at line 105 of file InventoryClickEvent.java.
References org.bukkit.event.inventory.InventoryEvent.getView(), org.bukkit.event.inventory.InventoryType.SlotType.OUTSIDE, and org.bukkit.inventory.InventoryView.setItem().
| void org.bukkit.event.inventory.InventoryClickEvent.setCursor | ( | ItemStack | what | ) |
Set the item on the cursor.
| what | The new cursor item. |
Definition at line 97 of file InventoryClickEvent.java.
References org.bukkit.event.inventory.InventoryEvent.getView(), and org.bukkit.inventory.InventoryView.setCursor().
| void org.bukkit.event.inventory.InventoryClickEvent.setResult | ( | Result | newResult | ) |
Definition at line 77 of file InventoryClickEvent.java.