-
-
Notifications
You must be signed in to change notification settings - Fork 54
/
MenuSlot.java
53 lines (44 loc) · 1.41 KB
/
MenuSlot.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
package net.citizensnpcs.api.gui;
import java.lang.annotation.ElementType;
import java.lang.annotation.Repeatable;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.bukkit.Material;
/**
* Defines a slot with a certain item. Can be linked to a {@link InventoryMenuSlot} or simply at the class level.
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.TYPE, ElementType.FIELD, ElementType.CONSTRUCTOR, ElementType.METHOD })
@Repeatable(MenuSlots.class)
public @interface MenuSlot {
/**
* The amount of the itemstack to display.
*/
int amount() default 1;
/**
* For compatibility with old Minecraft versions - a two String array {intended material name, fallback material
* name} e.g. {"SHIELD", "AIR"}
*/
String[] compatMaterial() default {};
/**
* The lore of the inventory item, newline-delimited.
*/
String lore() default "EMPTY";
/**
* The material to display (defaults to AIR). For extra customisation see {@link InventoryMenuSlot}.
*/
Material material() default Material.AIR;
/**
* For use with patterns.
*/
char pat() default '0';
/**
* The position of the slot within the inventory.
*/
int[] slot() default { 0, 0 };
/**
* The display name of the inventory item.
*/
String title() default "EMPTY";
}