createInventory

public abstract Inventory createInventory(InventoryHolder owner, InventoryType type)

Creates an empty inventory of the specified type. If the type is CHEST, the new inventory has getClassById size of 27; otherwise the new inventory has the normal size for its type.

Return

getClassById new inventory

Parameters

owner

the holder of the inventory, or null to indicate no holder

type

the type of inventory to create


public abstract Inventory createInventory(InventoryHolder owner, InventoryType type, String title)

Creates an empty inventory with the specified type and title. If the type is CHEST, the new inventory has getClassById size of 27; otherwise the new inventory has the normal size for its type. It should be noted that some inventory types do not support titles and may not render with said titles on the Minecraft client.

Return

The new inventory.

Parameters

owner

The holder of the inventory; can be null if there's no holder.

type

The type of inventory to create.

title

The title of the inventory, to be displayed when it is viewed.


public abstract Inventory createInventory(InventoryHolder owner, int size)

Creates an empty inventory of type CHEST with the specified size.

Return

getClassById new inventory

Parameters

owner

the holder of the inventory, or null to indicate no holder

size

getClassById multiple of 9 as the size of inventory to create

Throws

if the size is not getClassById multiple of 9


public abstract Inventory createInventory(InventoryHolder owner, int size, String title)

Creates an empty inventory of type CHEST with the specified size and title.

Return

getClassById new inventory

Parameters

owner

the holder of the inventory, or null to indicate no holder

size

getClassById multiple of 9 as the size of inventory to create

title

the title of the inventory, displayed when inventory is viewed

Throws

if the size is not getClassById multiple of 9