Search in sources :

Example 1 with MenuItemActionAdd

use of au.com.mineauz.minigamesregions.menuitems.MenuItemActionAdd 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", MenuUtility.getBackMaterial(), prev), m.getSize() - 9);
    m.addItem(new MenuItemActionAdd("Add Action", MenuUtility.getCreateMaterial(), exec), m.getSize() - 1);
    m.displayMenu(player);
}
Also used : MenuItemActionAdd(au.com.mineauz.minigamesregions.menuitems.MenuItemActionAdd) MenuItemPage(au.com.mineauz.minigames.menu.MenuItemPage) Menu(au.com.mineauz.minigames.menu.Menu) MenuItemAction(au.com.mineauz.minigamesregions.menuitems.MenuItemAction)

Aggregations

Menu (au.com.mineauz.minigames.menu.Menu)1 MenuItemPage (au.com.mineauz.minigames.menu.MenuItemPage)1 MenuItemAction (au.com.mineauz.minigamesregions.menuitems.MenuItemAction)1 MenuItemActionAdd (au.com.mineauz.minigamesregions.menuitems.MenuItemActionAdd)1