Package org.bukkit.event.inventory
Enum InventoryType
- All Implemented Interfaces:
Serializable
,Comparable<InventoryType>
,Constable
public enum InventoryType extends Enum<InventoryType>
Represents the different kinds of inventories available in Bukkit.
Only InventoryTypes marked
The current list of inventories that cannot be created via
Only InventoryTypes marked
isCreatable()
can be created.
The current list of inventories that cannot be created via
Bukkit.createInventory(org.bukkit.inventory.InventoryHolder, org.bukkit.event.inventory.InventoryType)
are:SeeCREATIVE
,CRAFTING
andMERCHANT
Bukkit.createInventory(org.bukkit.inventory.InventoryHolder, org.bukkit.event.inventory.InventoryType)
for more information.-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
InventoryType.SlotType
-
Enum Constant Summary
Enum Constants Enum Constant Description ANVIL
An anvil inventory, with 2 CRAFTING slots and 1 RESULT slotBARREL
A barrel box inventory, with 27 slots of type CONTAINER.BEACON
A beacon inventory, with 1 CRAFTING slotBLAST_FURNACE
A blast furnace inventory, with a RESULT slot, a CRAFTING slot, and a FUEL slot.BREWING
A brewing stand inventory, with one FUEL slot and four CRAFTING slots.CARTOGRAPHY
Cartography inventory with 2 CRAFTING slots, and 1 RESULT slot.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 two CRAFTING slots 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.GRINDSTONE
Grindstone inventory with 2 CRAFTING slots, and 1 RESULT slot.HOPPER
A hopper inventory, with 5 slots of type CONTAINER.LECTERN
A lectern inventory, with 1 BOOK slot.LOOM
Loom inventory, with 3 CRAFTING slots, and 1 RESULT slot.MERCHANT
The merchant inventory, with 2 CRAFTING slots, and 1 RESULT slot.PLAYER
A player's inventory, with 9 QUICKBAR slots, 27 CONTAINER slots, 4 ARMOR slots and 1 offhand slot.SHULKER_BOX
A shulker box inventory, with 27 slots of type CONTAINER.SMITHING
A smithing inventory, with 2 CRAFTING slots and 1 RESULT slotSMOKER
A smoker inventory, with a RESULT slot, a CRAFTING slot, and a FUEL slot.STONECUTTER
Stonecutter inventory with 1 CRAFTING slot, and 1 RESULT slot.WORKBENCH
A workbench inventory, with 9 CRAFTING slots and a RESULT slot. -
Method Summary
Modifier and Type Method Description int
getDefaultSize()
String
getDefaultTitle()
boolean
isCreatable()
Denotes that this InventoryType can be created via the normalBukkit.createInventory(org.bukkit.inventory.InventoryHolder, org.bukkit.event.inventory.InventoryType)
methods.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.
-
Enum Constant Details
-
CHEST
A chest inventory, with 0, 9, 18, 27, 36, 45, or 54 slots of type CONTAINER. -
DISPENSER
A dispenser inventory, with 9 slots of type CONTAINER. -
DROPPER
A dropper inventory, with 9 slots of type CONTAINER. -
FURNACE
A furnace inventory, with a RESULT slot, a CRAFTING slot, and a FUEL slot. -
WORKBENCH
A workbench inventory, with 9 CRAFTING slots and a RESULT slot. -
CRAFTING
A player's crafting inventory, with 4 CRAFTING slots and a RESULT slot. Also implies that the 4 ARMOR slots are accessible. -
ENCHANTING
An enchantment table inventory, with two CRAFTING slots and three enchanting buttons. -
BREWING
A brewing stand inventory, with one FUEL slot and four CRAFTING slots. -
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
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
The merchant inventory, with 2 CRAFTING slots, and 1 RESULT slot. -
ENDER_CHEST
The ender chest inventory, with 27 slots. -
ANVIL
An anvil inventory, with 2 CRAFTING slots and 1 RESULT slot -
SMITHING
A smithing inventory, with 2 CRAFTING slots and 1 RESULT slot -
BEACON
A beacon inventory, with 1 CRAFTING slot -
HOPPER
A hopper inventory, with 5 slots of type CONTAINER. -
SHULKER_BOX
A shulker box inventory, with 27 slots of type CONTAINER. -
BARREL
A barrel box inventory, with 27 slots of type CONTAINER. -
BLAST_FURNACE
A blast furnace inventory, with a RESULT slot, a CRAFTING slot, and a FUEL slot. -
LECTERN
A lectern inventory, with 1 BOOK slot. -
SMOKER
A smoker inventory, with a RESULT slot, a CRAFTING slot, and a FUEL slot. -
LOOM
Loom inventory, with 3 CRAFTING slots, and 1 RESULT slot. -
CARTOGRAPHY
Cartography inventory with 2 CRAFTING slots, and 1 RESULT slot. -
GRINDSTONE
Grindstone inventory with 2 CRAFTING slots, and 1 RESULT slot. -
STONECUTTER
Stonecutter inventory with 1 CRAFTING slot, and 1 RESULT slot.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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() -
getDefaultTitle
-
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
-