Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
EntityEquipment.java
1 package org.bukkit.inventory;
2 
3 import org.bukkit.entity.Entity;
4 
5 /**
6  * An interface to a creatures inventory
7  */
8 public interface EntityEquipment {
9 
10  /**
11  * Gets a copy of the item the entity is currently holding
12  *
13  * @return the currently held item
14  */
16 
17  /**
18  * Sets the item the entity is holding
19  *
20  * @param stack The item to put into the entities hand
21  */
22  void setItemInHand(ItemStack stack);
23 
24  /**
25  * Gets a copy of the helmet currently being worn by the entity
26  *
27  * @return The helmet being worn
28  */
30 
31  /**
32  * Sets the helmet worn by the entity
33  *
34  * @param helmet The helmet to put on the entity
35  */
36  void setHelmet(ItemStack helmet);
37 
38  /**
39  * Gets a copy of the chest plate currently being worn by the entity
40  *
41  * @return The chest plate being worn
42  */
44 
45  /**
46  * Sets the chest plate worn by the entity
47  *
48  * @param chestplate The chest plate to put on the entity
49  */
50  void setChestplate(ItemStack chestplate);
51 
52  /**
53  * Gets a copy of the leggings currently being worn by the entity
54  *
55  * @return The leggings being worn
56  */
58 
59  /**
60  * Sets the leggings worn by the entity
61  *
62  * @param leggings The leggings to put on the entity
63  */
64  void setLeggings(ItemStack leggings);
65 
66  /**
67  * Gets a copy of the boots currently being worn by the entity
68  *
69  * @return The boots being worn
70  */
72 
73  /**
74  * Sets the boots worn by the entity
75  *
76  * @param boots The boots to put on the entity
77  */
78  void setBoots(ItemStack boots);
79 
80  /**
81  * Gets a copy of all worn armor
82  *
83  * @return The array of worn armor
84  */
86 
87  /**
88  * Sets the entities armor to the provided array of ItemStacks
89  *
90  * @param items The items to set the armor as
91  */
92  void setArmorContents(ItemStack[] items);
93 
94  /**
95  * Clears the entity of all armor and held items
96  */
97  void clear();
98 
99  /**
100  * Gets the chance of the currently held item being dropped upon this
101  * creature's death
102  * <p>
103  * <ul>
104  * <li>A drop chance of 0F will never drop
105  * <li>A drop chance of 1F will always drop
106  * </ul>
107  *
108  * @return chance of the currently held item being dropped (1 for players)
109  */
110  float getItemInHandDropChance();
111 
112  /**
113  * Sets the chance of the item this creature is currently holding being
114  * dropped upon this creature's death
115  * <p>
116  * <ul>
117  * <li>A drop chance of 0F will never drop
118  * <li>A drop chance of 1F will always drop
119  * </ul>
120  *
121  * @param chance the chance of the currently held item being dropped
122  * @throws UnsupportedOperationException when called on players
123  */
124  void setItemInHandDropChance(float chance);
125 
126  /**
127  * Gets the chance of the helmet being dropped upon this creature's death
128  * <p>
129  * <ul>
130  * <li>A drop chance of 0F will never drop
131  * <li>A drop chance of 1F will always drop
132  * </ul>
133  *
134  * @return the chance of the helmet being dropped (1 for players)
135  */
136  float getHelmetDropChance();
137 
138  /**
139  * Sets the chance of the helmet being dropped upon this creature's death
140  * <p>
141  * <ul>
142  * <li>A drop chance of 0F will never drop
143  * <li>A drop chance of 1F will always drop
144  * </ul>
145  *
146  * @param chance of the helmet being dropped
147  * @throws UnsupportedOperationException when called on players
148  */
149  void setHelmetDropChance(float chance);
150 
151  /**
152  * Gets the chance of the chest plate being dropped upon this creature's
153  * death
154  * <p>
155  * <ul>
156  * <li>A drop chance of 0F will never drop
157  * <li>A drop chance of 1F will always drop
158  * </ul>
159  *
160  * @return the chance of the chest plate being dropped (1 for players)
161  */
162  float getChestplateDropChance();
163 
164  /**
165  * Sets the chance of the chest plate being dropped upon this creature's
166  * death
167  * <p>
168  * <ul>
169  * <li>A drop chance of 0F will never drop
170  * <li>A drop chance of 1F will always drop
171  * </ul>
172  *
173  * @param chance of the chest plate being dropped
174  * @throws UnsupportedOperationException when called on players
175  */
176  void setChestplateDropChance(float chance);
177 
178  /**
179  * Gets the chance of the leggings being dropped upon this creature's
180  * death
181  * <p>
182  * <ul>
183  * <li>A drop chance of 0F will never drop
184  * <li>A drop chance of 1F will always drop
185  * </ul>
186  *
187  * @return the chance of the leggings being dropped (1 for players)
188  */
189  float getLeggingsDropChance();
190 
191  /**
192  * Sets the chance of the leggings being dropped upon this creature's
193  * death
194  * <p>
195  * <ul>
196  * <li>A drop chance of 0F will never drop
197  * <li>A drop chance of 1F will always drop
198  * </ul>
199  *
200  * @param chance chance of the leggings being dropped
201  * @throws UnsupportedOperationException when called on players
202  */
203  void setLeggingsDropChance(float chance);
204 
205  /**
206  * Gets the chance of the boots being dropped upon this creature's death
207  * <p>
208  * <ul>
209  * <li>A drop chance of 0F will never drop
210  * <li>A drop chance of 1F will always drop
211  * </ul>
212  *
213  * @return the chance of the boots being dropped (1 for players)
214  */
215  float getBootsDropChance();
216 
217  /**
218  * Sets the chance of the boots being dropped upon this creature's death
219  * <p>
220  * <ul>
221  * <li>A drop chance of 0F will never drop
222  * <li>A drop chance of 1F will always drop
223  * </ul>
224  *
225  * @param chance of the boots being dropped
226  * @throws UnsupportedOperationException when called on players
227  */
228  void setBootsDropChance(float chance);
229 
230  /**
231  * Get the entity this EntityEquipment belongs to
232  *
233  * @return the entity this EntityEquipment belongs to
234  */
235  Entity getHolder();
236 }
void setItemInHandDropChance(float chance)
void setItemInHand(ItemStack stack)
void setHelmet(ItemStack helmet)
void setArmorContents(ItemStack[] items)
void setLeggings(ItemStack leggings)
void setBoots(ItemStack boots)
void setBootsDropChance(float chance)
void setHelmetDropChance(float chance)
void setChestplate(ItemStack chestplate)
void setChestplateDropChance(float chance)
void setLeggingsDropChance(float chance)