Enum Class ItemAction
- All Implemented Interfaces:
Serializable,Comparable<ItemAction>,Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionA max-size stack of the clicked item is put on the cursor.The inventory is searched for the same material, and they are put on the cursor up toMaterial.getMaxStackSize().Holding Ctrl while pressing the "Drop" key (defaults to Q) in inventory.Any action done with the Creative inventory open.Pressing the left mouse button twice in quick succession.The "Drop" key (defaults to Q) in inventory.The entire cursor item is dropped.The entire clicked slot is dropped.Drop item in world (with closed inventory press the "Drop" key (defaults to Q)One item is dropped from the cursor.One item is dropped from the clicked slot.The clicked item is moved to the hotbar, and the item currently there is re-added to the player's inventory.The clicked slot and the picked hotbar slot are swapped.Left-clicking the airThe middle mouse button, or a "scrollwheel click".The item is moved to the opposite inventory if a space is found.One of the number keys 1-9, correspond to slots on the hotbar.All of the items on the clicked slot are moved to the cursor.Half of the items on the clicked slot are moved to the cursor.One of the items on the clicked slot are moved to the cursor.Some of the items on the clicked slot are moved to the cursor.All of the items on the cursor are moved to the clicked slot.A single item from the cursor is moved to the clicked slot.Some of the items from the cursor are moved to the clicked slot (usually up to the max stack size).The right mouse button.Right-clicking the airRight-clicking a blockHolding shift while pressing the left mouse button.Holding shift while pressing the right mouse button.The "swap item with offhand" key (defaults to F).The clicked item and the cursor are exchanged.An unrecognized ClickType.Clicking the left mouse button on the grey area around the inventory.Clicking the right mouse button on the grey area around the inventory. -
Method Summary
Modifier and TypeMethodDescriptionstatic ItemActionReturns the enum constant of this class with the specified name.static ItemAction[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
LEFT_CLICK_BLOCK
-
RIGHT_CLICK_BLOCK
Right-clicking a block -
LEFT_CLICK_AIR
Left-clicking the air -
RIGHT_CLICK_AIR
Right-clicking the air -
NOTHING
-
PICKUP_ALL
All of the items on the clicked slot are moved to the cursor. -
PICKUP_SOME
Some of the items on the clicked slot are moved to the cursor. -
PICKUP_HALF
Half of the items on the clicked slot are moved to the cursor. -
PICKUP_ONE
One of the items on the clicked slot are moved to the cursor. -
PLACE_ALL
All of the items on the cursor are moved to the clicked slot. -
PLACE_SOME
Some of the items from the cursor are moved to the clicked slot (usually up to the max stack size). -
PLACE_ONE
A single item from the cursor is moved to the clicked slot. -
SWAP_WITH_CURSOR
The clicked item and the cursor are exchanged. -
DROP_ALL_CURSOR
The entire cursor item is dropped. -
DROP_ONE_CURSOR
One item is dropped from the cursor. -
DROP_ALL_SLOT
The entire clicked slot is dropped. -
DROP_ONE_SLOT
One item is dropped from the clicked slot. -
MOVE_TO_OTHER_INVENTORY
The item is moved to the opposite inventory if a space is found. -
HOTBAR_MOVE_AND_READD
The clicked item is moved to the hotbar, and the item currently there is re-added to the player's inventory.The hotbar includes the player's off hand.
-
HOTBAR_SWAP
The clicked slot and the picked hotbar slot are swapped.The hotbar includes the player's off hand.
-
CLONE_STACK
A max-size stack of the clicked item is put on the cursor. -
COLLECT_TO_CURSOR
The inventory is searched for the same material, and they are put on the cursor up toMaterial.getMaxStackSize(). -
UNKNOWN
An unrecognized ClickType. -
LEFT
-
SHIFT_LEFT
Holding shift while pressing the left mouse button. -
RIGHT
The right mouse button. -
SHIFT_RIGHT
Holding shift while pressing the right mouse button. -
WINDOW_BORDER_LEFT
Clicking the left mouse button on the grey area around the inventory. -
WINDOW_BORDER_RIGHT
Clicking the right mouse button on the grey area around the inventory. -
MIDDLE
The middle mouse button, or a "scrollwheel click". -
NUMBER_KEY
One of the number keys 1-9, correspond to slots on the hotbar. -
DOUBLE_CLICK
Pressing the left mouse button twice in quick succession. -
DROP
The "Drop" key (defaults to Q) in inventory. -
CONTROL_DROP
Holding Ctrl while pressing the "Drop" key (defaults to Q) in inventory. -
CREATIVE
Any action done with the Creative inventory open. -
SWAP_OFFHAND
The "swap item with offhand" key (defaults to F). -
DROP_ITEM_EVENT
Drop item in world (with closed inventory press the "Drop" key (defaults to Q)
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-