add ShopPageBase#getSlot to get a slot from row and column offset
This commit is contained in:
parent
c4f51efb4d
commit
1a54911231
@ -54,6 +54,11 @@ public abstract class ShopPageBase<PluginType extends Lifetimed, ShopType extend
|
||||
|
||||
protected abstract void buildPage();
|
||||
|
||||
protected int getSlot(int rowOffset, int columnOffset)
|
||||
{
|
||||
return (rowOffset * 9) + columnOffset;
|
||||
}
|
||||
|
||||
protected void addItem(int slot, ItemStack item)
|
||||
{
|
||||
if (slot > inventory.getSize() - 1)
|
||||
|
Loading…
Reference in New Issue
Block a user