Search in sources :

Example 1 with MenuItemAction

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);
}
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