use of au.com.mineauz.minigamesregions.menuitems.MenuItemAction in project Minigames by AddstarMC.
the class Actions method displayMenu.
public static void displayMenu(MinigamePlayer player, BaseExecutor exec, Menu prev) {
Menu m = new Menu(3, "Actions", player);
m.setPreviousPage(prev);
for (ActionInterface act : exec.getActions()) {
m.addItem(new MenuItemAction(MinigameUtils.capitalize(act.getName()), Material.PAPER, exec, act));
}
m.addItem(new MenuItemPage("Back", Material.REDSTONE_TORCH_ON, prev), m.getSize() - 9);
m.addItem(new MenuItemActionAdd("Add Action", Material.ITEM_FRAME, exec), m.getSize() - 1);
m.displayMenu(player);
}
Aggregations