Fork of Poseidon providing Bukkit #1060 to older Beta versions (b1.0-b1.7.3)
1package org.bukkit.inventory;
2
3/**
4 * Includes interface to the 4 armor slots
5 */
6public interface PlayerInventory extends Inventory {
7
8 /**
9 * Get all ItemStacks from the armor slots
10 *
11 * @return All the ItemStacks from the armor slots
12 */
13 public ItemStack[] getArmorContents();
14
15 /**
16 * Return the ItemStack from the helmet slot
17 *
18 * @return The ItemStack in the helmet slot
19 */
20 public ItemStack getHelmet();
21
22 /**
23 * Return the ItemStack from the chestplate slot
24 *
25 * @return The ItemStack in the chestplate slot
26 */
27 public ItemStack getChestplate();
28
29 /**
30 * Return the ItemStack from the leg slot
31 *
32 * @return The ItemStack in the leg slot
33 */
34 public ItemStack getLeggings();
35
36 /**
37 * Return the ItemStack from the boots slot
38 *
39 * @return The ItemStack in the boots slot
40 */
41 public ItemStack getBoots();
42
43 /**
44 * Put the given ItemStacks into the armor slots
45 *
46 * @param items The ItemStacks to use as armour
47 */
48 public void setArmorContents(ItemStack[] items);
49
50 /**
51 * Put the given ItemStack into the helmet slot
52 * This does not check if the ItemStack is a helmet
53 *
54 * @param helmet The ItemStack to use as helmet
55 */
56 public void setHelmet(ItemStack helmet);
57
58 /**
59 * Put the given ItemStack into the chestplate slot
60 * This does not check if the ItemStack is a chestplate
61 *
62 * @param chestplate The ItemStack to use as chestplate
63 */
64 public void setChestplate(ItemStack chestplate);
65
66 /**
67 * Put the given ItemStack into the leg slot
68 * This does not check if the ItemStack is a pair of leggings
69 *
70 * @param leggings The ItemStack to use as leggings
71 */
72 public void setLeggings(ItemStack leggings);
73
74 /**
75 * Put the given ItemStack into the boots slot
76 * This does not check if the ItemStack is a boots
77 *
78 * @param boots The ItemStack to use as boots
79 */
80 public void setBoots(ItemStack boots);
81
82 /**
83 * Returns the ItemStack currently hold
84 *
85 * @return The currently held ItemStack
86 */
87 public ItemStack getItemInHand();
88
89 /**
90 * Sets the item in hand
91 *
92 * @param stack Stack to set
93 */
94 public void setItemInHand(ItemStack stack);
95
96 /**
97 * Get the slot number of the currently held item
98 *
99 * @return Held item slot number
100 */
101 public int getHeldItemSlot();
102}