Package org.bukkit.event.inventory
Enum InventoryType
- java.lang.Object
-
- java.lang.Enum<InventoryType>
-
- org.bukkit.event.inventory.InventoryType
-
- All Implemented Interfaces:
Serializable,Comparable<InventoryType>
public enum InventoryType extends Enum<InventoryType>
Represents the different kinds of inventories available in Bukkit.
Only InventoryTypes markedisCreatable()can be created.
The current list of inventories that cannot be created viaBukkit.createInventory(org.bukkit.inventory.InventoryHolder, org.bukkit.event.inventory.InventoryType)are:
SeeCREATIVE,CRAFTINGandMERCHANTBukkit.createInventory(org.bukkit.inventory.InventoryHolder, org.bukkit.event.inventory.InventoryType)for more information.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classInventoryType.SlotType
-
Enum Constant Summary
Enum Constants Enum Constant Description ANVILAn anvil inventory, with 2 CRAFTING slots and 1 RESULT slotBARRELA barrel box inventory, with 27 slots of type CONTAINER.BEACONA beacon inventory, with 1 CRAFTING slotBLAST_FURNACEA blast furnace inventory, with a RESULT slot, a CRAFTING slot, and a FUEL slot.BREWINGA brewing stand inventory, with one FUEL slot and four CRAFTING slots.CARTOGRAPHYCartography inventory with 2 CRAFTING slots, and 1 RESULT slot.CHESTA chest inventory, with 0, 9, 18, 27, 36, 45, or 54 slots of type CONTAINER.CRAFTINGA player's crafting inventory, with 4 CRAFTING slots and a RESULT slot.CREATIVEThe creative mode inventory, with only 9 QUICKBAR slots and nothing else.DISPENSERA dispenser inventory, with 9 slots of type CONTAINER.DROPPERA dropper inventory, with 9 slots of type CONTAINER.ENCHANTINGAn enchantment table inventory, with two CRAFTING slots and three enchanting buttons.ENDER_CHESTThe ender chest inventory, with 27 slots.FURNACEA furnace inventory, with a RESULT slot, a CRAFTING slot, and a FUEL slot.GRINDSTONEGrindstone inventory with 2 CRAFTING slots, and 1 RESULT slot.HOPPERA hopper inventory, with 5 slots of type CONTAINER.LECTERNA lectern inventory, with 1 BOOK slot.LOOMLoom inventory, with 3 CRAFTING slots, and 1 RESULT slot.MERCHANTThe merchant inventory, with 2 CRAFTING slots, and 1 RESULT slot.PLAYERA player's inventory, with 9 QUICKBAR slots, 27 CONTAINER slots, 4 ARMOR slots and 1 offhand slot.SHULKER_BOXA shulker box inventory, with 27 slots of type CONTAINER.SMITHINGA smithing inventory, with 2 CRAFTING slots and 1 RESULT slotSMOKERA smoker inventory, with a RESULT slot, a CRAFTING slot, and a FUEL slot.STONECUTTERStonecutter inventory with 1 CRAFTING slot, and 1 RESULT slot.WORKBENCHA workbench inventory, with 9 CRAFTING slots and a RESULT slot.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetDefaultSize()@NotNull StringgetDefaultTitle()booleanisCreatable()Denotes that this InventoryType can be created via the normalBukkit.createInventory(org.bukkit.inventory.InventoryHolder, org.bukkit.event.inventory.InventoryType)methods.static InventoryTypevalueOf(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.
-
-
-
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 two CRAFTING slots and three enchanting buttons.
-
BREWING
public static final InventoryType BREWING
A brewing stand inventory, with one FUEL slot and four CRAFTING slots.
-
PLAYER
public static final InventoryType PLAYER
A player's inventory, with 9 QUICKBAR slots, 27 CONTAINER slots, 4 ARMOR slots and 1 offhand slot. The ARMOR and offhand 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 CRAFTING 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
-
SMITHING
public static final InventoryType SMITHING
A smithing 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.
-
SHULKER_BOX
public static final InventoryType SHULKER_BOX
A shulker box inventory, with 27 slots of type CONTAINER.
-
BARREL
public static final InventoryType BARREL
A barrel box inventory, with 27 slots of type CONTAINER.
-
BLAST_FURNACE
public static final InventoryType BLAST_FURNACE
A blast furnace inventory, with a RESULT slot, a CRAFTING slot, and a FUEL slot.
-
LECTERN
public static final InventoryType LECTERN
A lectern inventory, with 1 BOOK slot.
-
SMOKER
public static final InventoryType SMOKER
A smoker inventory, with a RESULT slot, a CRAFTING slot, and a FUEL slot.
-
LOOM
public static final InventoryType LOOM
Loom inventory, with 3 CRAFTING slots, and 1 RESULT slot.
-
CARTOGRAPHY
public static final InventoryType CARTOGRAPHY
Cartography inventory with 2 CRAFTING slots, and 1 RESULT slot.
-
GRINDSTONE
public static final InventoryType GRINDSTONE
Grindstone inventory with 2 CRAFTING slots, and 1 RESULT slot.
-
STONECUTTER
public static final InventoryType STONECUTTER
Stonecutter inventory with 1 CRAFTING slot, and 1 RESULT slot.
-
-
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 nameNullPointerException- if the argument is null
-
getDefaultSize
public int getDefaultSize()
-
isCreatable
public boolean isCreatable()
Denotes that this InventoryType can be created via the normalBukkit.createInventory(org.bukkit.inventory.InventoryHolder, org.bukkit.event.inventory.InventoryType)methods.- Returns:
- if this InventoryType can be created and shown to a player
-
-