org.bukkit.event.inventory
Enum InventoryType

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

public enum InventoryType
extends Enum<InventoryType>


Nested Class Summary
static class InventoryType.SlotType
           
 
Enum Constant Summary
ANVIL
          An anvil inventory, with 2 CRAFTING slots and 1 RESULT slot
BEACON
          A beacon inventory, with 1 CRAFTING slot
BREWING
          A brewing stand inventory, with one FUEL slot and three CRAFTING slots.
CHEST
          A chest inventory, with 0, 9, 18, 27, 36, 45, or 54 slots of type CONTAINER.
CRAFTING
          A player's crafting inventory, with 4 CRAFTING slots and a RESULT slot.
CREATIVE
          The creative mode inventory, with only 9 QUICKBAR slots and nothing else.
DISPENSER
          A dispenser inventory, with 9 slots of type CONTAINER.
DROPPER
          A dropper inventory, with 9 slots of type CONTAINER.
ENCHANTING
          An enchantment table inventory, with one CRAFTING slot and three enchanting buttons.
ENDER_CHEST
          The ender chest inventory, with 27 slots.
FURNACE
          A furnace inventory, with a RESULT slot, a CRAFTING slot, and a FUEL slot.
HOPPER
          A hopper inventory, with 5 slots of type CONTAINER.
MERCHANT
          The merchant inventory, with 2 TRADE-IN slots, and 1 RESULT slot.
PLAYER
          A player's inventory, with 9 QUICKBAR slots, 27 CONTAINER slots, and 4 ARMOR slots.
WORKBENCH
          A workbench inventory, with 9 CRAFTING slots and a RESULT slot.
 
Method Summary
 int getDefaultSize()
           
 String getDefaultTitle()
           
static InventoryType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static InventoryType[] 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

CHEST

public static final InventoryType CHEST
A chest inventory, with 0, 9, 18, 27, 36, 45, or 54 slots of type CONTAINER.


DISPENSER

public static final InventoryType DISPENSER
A dispenser inventory, with 9 slots of type CONTAINER.


DROPPER

public static final InventoryType DROPPER
A dropper inventory, with 9 slots of type CONTAINER.


FURNACE

public static final InventoryType FURNACE
A furnace inventory, with a RESULT slot, a CRAFTING slot, and a FUEL slot.


WORKBENCH

public static final InventoryType WORKBENCH
A workbench inventory, with 9 CRAFTING slots and a RESULT slot.


CRAFTING

public static final InventoryType CRAFTING
A player's crafting inventory, with 4 CRAFTING slots and a RESULT slot. Also implies that the 4 ARMOR slots are accessible.


ENCHANTING

public static final InventoryType ENCHANTING
An enchantment table inventory, with one CRAFTING slot and three enchanting buttons.


BREWING

public static final InventoryType BREWING
A brewing stand inventory, with one FUEL slot and three CRAFTING slots.


PLAYER

public static final InventoryType PLAYER
A player's inventory, with 9 QUICKBAR slots, 27 CONTAINER slots, and 4 ARMOR slots. The ARMOUR slots may not be visible to the player, though.


CREATIVE

public static final InventoryType CREATIVE
The creative mode inventory, with only 9 QUICKBAR slots and nothing else. (The actual creative interface with the items is client-side and cannot be altered by the server.)


MERCHANT

public static final InventoryType MERCHANT
The merchant inventory, with 2 TRADE-IN slots, and 1 RESULT slot.


ENDER_CHEST

public static final InventoryType ENDER_CHEST
The ender chest inventory, with 27 slots.


ANVIL

public static final InventoryType ANVIL
An anvil inventory, with 2 CRAFTING slots and 1 RESULT slot


BEACON

public static final InventoryType BEACON
A beacon inventory, with 1 CRAFTING slot


HOPPER

public static final InventoryType HOPPER
A hopper inventory, with 5 slots of type CONTAINER.

Method Detail

values

public static InventoryType[] 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 (InventoryType c : InventoryType.values())
    System.out.println(c);

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

valueOf

public static InventoryType 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

getDefaultSize

public int getDefaultSize()

getDefaultTitle

public String getDefaultTitle()


Copyright © 2014. All rights reserved.