Move these to the top

This commit is contained in:
Taah 2023-09-02 10:15:34 -07:00
parent 2364ab33ff
commit 3e9be76aa2
2 changed files with 6 additions and 6 deletions

View File

@ -39,13 +39,13 @@ public abstract class AbstractMenu
this(SafeMiniMessage.mmDeserializeWithoutEvents(name), rows);
}
public abstract boolean onClick(InventoryView view, Inventory inventory, Player player, ItemStack clicked);
public void open(Player player)
{
player.openInventory(this.inventory);
}
public abstract boolean onClick(InventoryView view, Inventory inventory, Player player, ItemStack clicked);
public enum Rows
{
ONE(9), TWO(18), THREE(27), FOUR(36), FIVE(45), SIX(54);

View File

@ -117,6 +117,10 @@ public abstract class PageableMenu<T>
this(SafeMiniMessage.mmDeserializeWithoutEvents(name), rows);
}
protected abstract ItemStack toItem(T object);
protected abstract List<T> list();
public void open(Player player)
{
open(player, 0);
@ -144,10 +148,6 @@ public abstract class PageableMenu<T>
this.pages.forEach((integer, page) -> page.onClick(this.onClick));
}
protected abstract ItemStack toItem(T object);
protected abstract List<T> list();
@Getter
@Setter