forked from PaperMC/Paper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
0084-Add-ArmorStand-Item-Meta.patch
109 lines (106 loc) · 3.86 KB
/
0084-Add-ArmorStand-Item-Meta.patch
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Zach Brown <[email protected]>
Date: Sat, 27 Jan 2018 17:06:24 -0500
Subject: [PATCH] Add ArmorStand Item Meta
This is adds basic item meta for armor stands. It does not add all
possible metadata however.
There are armor, hand, and equipment types, as well as position data
that can also be added here. This initial addition should serve a
starting point for future additions in this area.
diff --git a/src/main/java/com/destroystokyo/paper/inventory/meta/ArmorStandMeta.java b/src/main/java/com/destroystokyo/paper/inventory/meta/ArmorStandMeta.java
new file mode 100644
index 0000000000000000000000000000000000000000..7e4acfff16db80a75e1ff2fee1972b16955b0918
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/inventory/meta/ArmorStandMeta.java
@@ -0,0 +1,78 @@
+package com.destroystokyo.paper.inventory.meta;
+
+import org.bukkit.inventory.meta.ItemMeta;
+
+public interface ArmorStandMeta extends ItemMeta {
+
+ /**
+ * Gets whether the ArmorStand should be invisible when spawned
+ *
+ * @return true if this should be invisible
+ */
+ boolean isInvisible();
+
+ /**
+ * Gets whether this ArmorStand should have no base plate when spawned
+ *
+ * @return true if it will not have a base plate
+ */
+ boolean hasNoBasePlate();
+
+ /**
+ * Gets whether this ArmorStand should show arms when spawned
+ *
+ * @return true if it will show arms
+ */
+ boolean shouldShowArms();
+
+ /**
+ * Gets whether this ArmorStand will be small when spawned
+ *
+ * @return true if it will be small
+ */
+ boolean isSmall();
+
+ /**
+ * Gets whether this ArmorStand will be a marker when spawned
+ * The exact details of this flag are an implementation detail
+ *
+ * @return true if it will be a marker
+ */
+ boolean isMarker();
+
+ /**
+ * Sets that this ArmorStand should be invisible when spawned
+ *
+ * @param invisible true if set invisible
+ */
+ void setInvisible(boolean invisible);
+
+ /**
+ * Sets that this ArmorStand should have no base plate when spawned
+ *
+ * @param noBasePlate true if no base plate
+ */
+ void setNoBasePlate(boolean noBasePlate);
+
+ /**
+ * Sets that this ArmorStand should show arms when spawned
+ *
+ * @param showArms true if show arms
+ */
+ void setShowArms(boolean showArms);
+
+ /**
+ * Sets that this ArmorStand should be small when spawned
+ *
+ * @param small true if small
+ */
+ void setSmall(boolean small);
+
+ /**
+ * Sets that this ArmorStand should be a marker when spawned
+ * The exact details of this flag are an implementation detail
+ *
+ * @param marker true if a marker
+ */
+ void setMarker(boolean marker);
+}
diff --git a/src/main/java/org/bukkit/inventory/ItemType.java b/src/main/java/org/bukkit/inventory/ItemType.java
index d4c29562aa3999afdac8b5bc457aa3153a0e9d77..270f85e99084ddf029bef076c335fe6b9bbddbb5 100644
--- a/src/main/java/org/bukkit/inventory/ItemType.java
+++ b/src/main/java/org/bukkit/inventory/ItemType.java
@@ -1791,7 +1791,7 @@ public interface ItemType extends Keyed, Translatable {
ItemType.Typed<ItemMeta> RABBIT_STEW = getItemType("rabbit_stew");
ItemType.Typed<ItemMeta> RABBIT_FOOT = getItemType("rabbit_foot");
ItemType.Typed<ItemMeta> RABBIT_HIDE = getItemType("rabbit_hide");
- ItemType.Typed<ItemMeta> ARMOR_STAND = getItemType("armor_stand");
+ ItemType.Typed<com.destroystokyo.paper.inventory.meta.ArmorStandMeta> ARMOR_STAND = getItemType("armor_stand");
ItemType.Typed<ItemMeta> IRON_HORSE_ARMOR = getItemType("iron_horse_armor");
ItemType.Typed<ItemMeta> GOLDEN_HORSE_ARMOR = getItemType("golden_horse_armor");
ItemType.Typed<ItemMeta> DIAMOND_HORSE_ARMOR = getItemType("diamond_horse_armor");