add ShopPageBase#getSlot to get a slot from row and column offset

This commit is contained in:
Spencer 2018-01-02 17:12:02 -05:00 committed by Alexander Meech
parent c4f51efb4d
commit 1a54911231

View File

@ -54,6 +54,11 @@ public abstract class ShopPageBase<PluginType extends Lifetimed, ShopType extend
protected abstract void buildPage(); protected abstract void buildPage();
protected int getSlot(int rowOffset, int columnOffset)
{
return (rowOffset * 9) + columnOffset;
}
protected void addItem(int slot, ItemStack item) protected void addItem(int slot, ItemStack item)
{ {
if (slot > inventory.getSize() - 1) if (slot > inventory.getSize() - 1)