Skip to content

Commit

Permalink
Few fixed to match up with docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Burchard36 committed Apr 24, 2022
1 parent 4b74c54 commit 18c0831
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public PluginInventory onClick(final GuiClickAction clickAction) {
* @param item ClickableItem to add
* @return instance of this class
*/
public PluginInventory addClickableItemAtSlot(final int slot, final ClickableItem item) {
public PluginInventory setClickableItemAtSlot(final int slot, final ClickableItem item) {
this.clickableItems.put(slot, item);
return this;
}
Expand All @@ -136,7 +136,7 @@ public PluginInventory addClickableItems(final List<ClickableItem> items) {
public PluginInventory fillWith(final ClickableItem item, final boolean overwrite) {
for (int x = 0; x <= (this.inventory.getSize() - 1); x++) {
if (!overwrite) if (this.inventory.getItem(x) != null) continue;
this.addClickableItemAtSlot(x, item);
this.setClickableItemAtSlot(x, item);
}
return this;
}
Expand All @@ -145,7 +145,7 @@ public PluginInventory fillWith(final List<ClickableItem> items, final boolean o
for (int x = 0; x <= (this.inventory.getSize() - 1); x++) {
if (!overwrite) if (this.inventory.getItem(x) != null) continue;
try {
this.addClickableItemAtSlot(x, items.get(x));
this.setClickableItemAtSlot(x, items.get(x));
} catch (final IndexOutOfBoundsException ex) {
Logger.warn("IndexOutOfBounds exception encountered! This is an API level error please contact a developer");
}
Expand Down

0 comments on commit 18c0831

Please sign in to comment.