org.bukkit.event.inventory
Enum InventoryAction

java.lang.Object
  extended by java.lang.Enum<InventoryAction>
      extended by org.bukkit.event.inventory.InventoryAction
All Implemented Interfaces:
Serializable, Comparable<InventoryAction>

public enum InventoryAction
extends Enum<InventoryAction>

An estimation of what the result will be.


Enum Constant Summary
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 to Material.getMaxStackSize().
DROP_ALL_CURSOR
          The entire cursor item is dropped.
DROP_ALL_SLOT
          The entire clicked slot is dropped.
DROP_ONE_CURSOR
          One item is dropped from the cursor.
DROP_ONE_SLOT
          One item is dropped from the clicked slot.
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.
HOTBAR_SWAP
          The clicked slot and the picked hotbar slot are swapped.
MOVE_TO_OTHER_INVENTORY
          The item is moved to the opposite inventory if a space is found.
NOTHING
          Nothing will happen from the click.
PICKUP_ALL
          All 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.
PICKUP_SOME
          Some 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_ONE
          A single item from the cursor is 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).
SWAP_WITH_CURSOR
          The clicked item and the cursor are exchanged.
UNKNOWN
          An unrecognized ClickType.
 
Method Summary
static InventoryAction valueOf(String name)
          Returns the enum constant of this type with the specified name.
static InventoryAction[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

NOTHING

public static final InventoryAction NOTHING
Nothing will happen from the click.

There may be cases where nothing will happen and this is value is not provided, but it is guaranteed that this value is accurate when given.


PICKUP_ALL

public static final InventoryAction PICKUP_ALL
All of the items on the clicked slot are moved to the cursor.


PICKUP_SOME

public static final InventoryAction PICKUP_SOME
Some of the items on the clicked slot are moved to the cursor.


PICKUP_HALF

public static final InventoryAction PICKUP_HALF
Half of the items on the clicked slot are moved to the cursor.


PICKUP_ONE

public static final InventoryAction PICKUP_ONE
One of the items on the clicked slot are moved to the cursor.


PLACE_ALL

public static final InventoryAction PLACE_ALL
All of the items on the cursor are moved to the clicked slot.


PLACE_SOME

public static final InventoryAction PLACE_SOME
Some of the items from the cursor are moved to the clicked slot (usually up to the max stack size).


PLACE_ONE

public static final InventoryAction PLACE_ONE
A single item from the cursor is moved to the clicked slot.


SWAP_WITH_CURSOR

public static final InventoryAction SWAP_WITH_CURSOR
The clicked item and the cursor are exchanged.


DROP_ALL_CURSOR

public static final InventoryAction DROP_ALL_CURSOR
The entire cursor item is dropped.


DROP_ONE_CURSOR

public static final InventoryAction DROP_ONE_CURSOR
One item is dropped from the cursor.


DROP_ALL_SLOT

public static final InventoryAction DROP_ALL_SLOT
The entire clicked slot is dropped.


DROP_ONE_SLOT

public static final InventoryAction DROP_ONE_SLOT
One item is dropped from the clicked slot.


MOVE_TO_OTHER_INVENTORY

public static final InventoryAction MOVE_TO_OTHER_INVENTORY
The item is moved to the opposite inventory if a space is found.


HOTBAR_MOVE_AND_READD

public static final InventoryAction 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.


HOTBAR_SWAP

public static final InventoryAction HOTBAR_SWAP
The clicked slot and the picked hotbar slot are swapped.


CLONE_STACK

public static final InventoryAction CLONE_STACK
A max-size stack of the clicked item is put on the cursor.


COLLECT_TO_CURSOR

public static final InventoryAction COLLECT_TO_CURSOR
The inventory is searched for the same material, and they are put on the cursor up to Material.getMaxStackSize().


UNKNOWN

public static final InventoryAction UNKNOWN
An unrecognized ClickType.

Method Detail

values

public static InventoryAction[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (InventoryAction c : InventoryAction.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static InventoryAction valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
NullPointerException - if the argument is null


Copyright © 2013. All Rights Reserved.