Package org.bukkit.inventory
Interface MenuType
- All Superinterfaces:
FeatureDependant
,Keyed
,Keyed
- All Known Subinterfaces:
MenuType.Typed<V>
Represents different kinds of views, also known as menus, which can be
created and viewed by the player.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
MenuType.Typed<V extends InventoryView>
Typed represents a subtype ofMenuType
s that have a knownInventoryView
type at compile time. -
Field Summary
Modifier and TypeFieldDescriptionstatic final MenuType.Typed
<AnvilView> A MenuType which represents an anvil.static final MenuType.Typed
<BeaconView> A MenuType which represents a beacon.static final MenuType.Typed
<FurnaceView> A MenuType which represents a blast furnace.static final MenuType.Typed
<BrewingStandView> A MenuType which represents a brewing stand.static final MenuType.Typed
<InventoryView> A MenuType which represents a cartography table.static final MenuType.Typed
<CrafterView> A MenuType which represents a crafterstatic final MenuType.Typed
<InventoryView> A MenuType which represents a crafting table.static final MenuType.Typed
<EnchantmentView> A MenuType which represents an enchantment table.static final MenuType.Typed
<FurnaceView> A MenuType which represents a furnace.static final MenuType.Typed
<InventoryView> A MenuType which represents a dispenser/dropper like menu with 3 columns and 3 rows.static final MenuType.Typed
<InventoryView> A MenuType which represents a chest with 1 row.static final MenuType.Typed
<InventoryView> A MenuType which represents a chest with 2 rows.static final MenuType.Typed
<InventoryView> A MenuType which represents a chest with 3 rows.static final MenuType.Typed
<InventoryView> A MenuType which represents a chest with 4 rows.static final MenuType.Typed
<InventoryView> A MenuType which represents a chest with 5 rows.static final MenuType.Typed
<InventoryView> A MenuType which represents a chest with 6 rows.static final MenuType.Typed
<InventoryView> A MenuType which represents a grindstone.static final MenuType.Typed
<InventoryView> A MenuType which represents a hopper.static final MenuType.Typed
<LecternView> A MenuType which represents a lectern, a book like view.static final MenuType.Typed
<LoomView> A MenuType which represents a loom.static final MenuType.Typed
<MerchantView> A MenuType which represents a merchant.static final MenuType.Typed
<InventoryView> A MenuType which represents a shulker box.static final MenuType.Typed
<InventoryView> A MenuType which represents a stonecutter.static final MenuType.Typed
<FurnaceView> A MenuType which represents a smoker.static final MenuType.Typed
<StonecutterView> A MenuType which represents a stonecutter. -
Method Summary
Modifier and TypeMethodDescriptioncreate
(@NotNull HumanEntity player, Component title) Creates a view of the specified menu type.@NotNull Class
<? extends InventoryView> Gets theInventoryView
class of this MenuType.typed()
Yields this MenuType as a typed version of itself with a plainInventoryView
representing it.<V extends InventoryView>
MenuType.Typed<V> Yields this MenuType as a typed version of itself with a specificInventoryView
representing it.Methods inherited from interface io.papermc.paper.world.flag.FeatureDependant
requiredFeatures
-
Field Details
-
GENERIC_9X1
A MenuType which represents a chest with 1 row. -
GENERIC_9X2
A MenuType which represents a chest with 2 rows. -
GENERIC_9X3
A MenuType which represents a chest with 3 rows. -
GENERIC_9X4
A MenuType which represents a chest with 4 rows. -
GENERIC_9X5
A MenuType which represents a chest with 5 rows. -
GENERIC_9X6
A MenuType which represents a chest with 6 rows. -
GENERIC_3X3
A MenuType which represents a dispenser/dropper like menu with 3 columns and 3 rows. -
CRAFTER_3X3
A MenuType which represents a crafter -
ANVIL
A MenuType which represents an anvil. -
BEACON
A MenuType which represents a beacon. -
BLAST_FURNACE
A MenuType which represents a blast furnace. -
BREWING_STAND
A MenuType which represents a brewing stand. -
CRAFTING
A MenuType which represents a crafting table. -
ENCHANTMENT
A MenuType which represents an enchantment table. -
FURNACE
A MenuType which represents a furnace. -
GRINDSTONE
A MenuType which represents a grindstone. -
HOPPER
A MenuType which represents a hopper. -
LECTERN
A MenuType which represents a lectern, a book like view. -
LOOM
A MenuType which represents a loom. -
MERCHANT
A MenuType which represents a merchant. -
SHULKER_BOX
A MenuType which represents a shulker box. -
SMITHING
A MenuType which represents a stonecutter. -
SMOKER
A MenuType which represents a smoker. -
CARTOGRAPHY_TABLE
A MenuType which represents a cartography table. -
STONECUTTER
A MenuType which represents a stonecutter.
-
-
Method Details
-
create
@NotNull @NotNull InventoryView create(@NotNull @NotNull HumanEntity player, @NotNull Component title) Creates a view of the specified menu type.The player provided to create this view must be the player the view is opened for. See
HumanEntity.openInventory(InventoryView)
for more information.- Parameters:
player
- the player the view belongs totitle
- the title of the view- Returns:
- the created
InventoryView
-
typed
Yields this MenuType as a typed version of itself with a plainInventoryView
representing it.- Returns:
- the typed MenuType.
-
typed
@NotNull <V extends InventoryView> MenuType.Typed<V> typed(@NotNull @NotNull Class<V> viewClass) throws IllegalArgumentException Yields this MenuType as a typed version of itself with a specificInventoryView
representing it.- Type Parameters:
V
- the generic type of the InventoryView to get this MenuType with- Parameters:
viewClass
- the class type of theInventoryView
to type thisInventoryView
with.- Returns:
- the typed MenuType
- Throws:
IllegalArgumentException
- if the provided viewClass cannot be typed to this MenuType
-
getInventoryViewClass
Gets theInventoryView
class of this MenuType.- Returns:
- the
InventoryView
class of this MenuType
-