Package net.citizensnpcs.api.gui
Annotation Type MenuSlot
@Retention(RUNTIME)
@Target({TYPE,FIELD,CONSTRUCTOR,METHOD})
@Repeatable(MenuSlots.class)
public @interface MenuSlot
Defines a slot with a certain item. Can be linked to a
InventoryMenuSlot
or simply at the class level.-
Optional Element Summary
Modifier and TypeOptional ElementDescriptionint
The amount of the itemstack to display.String[]
For compatibility with old Minecraft versions - a two String array {intended material name, fallback material name} e.g.The lore of the inventory item, newline-delimited.The material to display (defaults to AIR).char
For use with patterns.int[]
The position of the slot within the inventory.The display name of the inventory item.
-
Element Details
-
amount
int amountThe amount of the itemstack to display.- Default:
1
-
compatMaterial
String[] compatMaterialFor compatibility with old Minecraft versions - a two String array {intended material name, fallback material name} e.g. {"SHIELD", "AIR"}- Default:
{}
-
lore
String loreThe lore of the inventory item, newline-delimited.- Default:
"EMPTY"
-
material
Material materialThe material to display (defaults to AIR). For extra customisation seeInventoryMenuSlot
.- Default:
AIR
-
pat
char patFor use with patterns.- Default:
'0'
-
slot
int[] slotThe position of the slot within the inventory.- Default:
{0, 0}
-
title
String titleThe display name of the inventory item.- Default:
"EMPTY"
-