Commits
DemonWav authored and md_5 committed b465559cb5e
35 35 | */ |
36 36 | public ItemStack getLeggings(); |
37 37 | |
38 38 | /** |
39 39 | * Return the ItemStack from the boots slot |
40 40 | * |
41 41 | * @return The ItemStack in the boots slot |
42 42 | */ |
43 43 | public ItemStack getBoots(); |
44 44 | |
45 + | /** |
46 + | * Stores the ItemStack at the given index of the inventory. |
47 + | * <p> |
48 + | * Indexes 0 through 8 refer to the hotbar. 9 through 35 refer to the main inventory, counting up from 9 at the top |
49 + | * left corner of the inventory, moving to the right, and moving to the row below it back on the left side when it |
50 + | * reaches the end of the row. It follows the same path in the inventory like you would read a book. |
51 + | * <p> |
52 + | * Indexes 36 through 39 refer to the armor slots. Though you can set armor with this method using these indexes, |
53 + | * you are encouraged to use the provided methods for those slots. |
54 + | * <p> |
55 + | * If you attempt to use this method with an index less than 0 or greater than 39, an ArrayIndexOutOfBounds |
56 + | * exception will be thrown. |
57 + | * |
58 + | * @param index The index where to put the ItemStack |
59 + | * @param item The ItemStack to set |
60 + | * @throws ArrayIndexOutOfBoundsException when index < 0 || index > 39 |
61 + | * @see #setBoots(ItemStack) |
62 + | * @see #setChestplate(ItemStack) |
63 + | * @see #setHelmet(ItemStack) |
64 + | * @see #setLeggings(ItemStack) |
65 + | */ |
66 + | |
67 + | public void setItem(int index, ItemStack item); |
68 + | |
45 69 | /** |
46 70 | * Put the given ItemStacks into the armor slots |
47 71 | * |
48 72 | * @param items The ItemStacks to use as armour |
49 73 | */ |
50 74 | public void setArmorContents(ItemStack[] items); |
51 75 | |
52 76 | /** |
53 77 | * Put the given ItemStack into the helmet slot. This does not check if |
54 78 | * the ItemStack is a helmet |