Search in sources :

Example 1 with MenuItemConditionAdd

use of au.com.mineauz.minigamesregions.menuitems.MenuItemConditionAdd in project Minigames by AddstarMC.

the class Conditions method displayMenu.

public static void displayMenu(MinigamePlayer player, RegionExecutor exec, Menu prev) {
    Menu m = new Menu(3, "Conditions", player);
    m.setPreviousPage(prev);
    for (ConditionInterface con : exec.getConditions()) {
        m.addItem(new MenuItemCondition(MinigameUtils.capitalize(con.getName()), Material.PAPER, exec, con));
    }
    m.addItem(new MenuItemPage("Back", Material.REDSTONE_TORCH_ON, prev), m.getSize() - 9);
    m.addItem(new MenuItemConditionAdd("Add Condition", Material.ITEM_FRAME, exec), m.getSize() - 1);
    m.displayMenu(player);
}
Also used : MenuItemPage(au.com.mineauz.minigames.menu.MenuItemPage) MenuItemCondition(au.com.mineauz.minigamesregions.menuitems.MenuItemCondition) MenuItemConditionAdd(au.com.mineauz.minigamesregions.menuitems.MenuItemConditionAdd) Menu(au.com.mineauz.minigames.menu.Menu)

Example 2 with MenuItemConditionAdd

use of au.com.mineauz.minigamesregions.menuitems.MenuItemConditionAdd in project Minigames by AddstarMC.

the class Conditions method displayMenu.

public static void displayMenu(MinigamePlayer player, NodeExecutor exec, Menu prev) {
    Menu m = new Menu(3, "Conditions", player);
    m.setPreviousPage(prev);
    for (ConditionInterface con : exec.getConditions()) {
        m.addItem(new MenuItemCondition(MinigameUtils.capitalize(con.getName()), Material.PAPER, exec, con));
    }
    m.addItem(new MenuItemPage("Back", Material.REDSTONE_TORCH_ON, prev), m.getSize() - 9);
    m.addItem(new MenuItemConditionAdd("Add Condition", Material.ITEM_FRAME, exec), m.getSize() - 1);
    m.displayMenu(player);
}
Also used : MenuItemPage(au.com.mineauz.minigames.menu.MenuItemPage) MenuItemCondition(au.com.mineauz.minigamesregions.menuitems.MenuItemCondition) MenuItemConditionAdd(au.com.mineauz.minigamesregions.menuitems.MenuItemConditionAdd) Menu(au.com.mineauz.minigames.menu.Menu)

Aggregations

Menu (au.com.mineauz.minigames.menu.Menu)2 MenuItemPage (au.com.mineauz.minigames.menu.MenuItemPage)2 MenuItemCondition (au.com.mineauz.minigamesregions.menuitems.MenuItemCondition)2 MenuItemConditionAdd (au.com.mineauz.minigamesregions.menuitems.MenuItemConditionAdd)2