Search in sources :

Example 11 with MenuItemPage

use of au.com.mineauz.minigames.menu.MenuItemPage in project Minigames by AddstarMC.

the class PlayerHealthRangeCondition method displayMenu.

@Override
public boolean displayMenu(MinigamePlayer player, Menu prev) {
    Menu m = new Menu(3, "Health Range", player);
    m.addItem(minHealth.getMenuItem("Min Health", Material.STEP, 0, 20));
    m.addItem(maxHealth.getMenuItem("Max Health", Material.STONE, 0, 20));
    m.addItem(new MenuItemPage("Back", Material.REDSTONE_TORCH_ON, prev), m.getSize() - 9);
    addInvertMenuItem(m);
    m.displayMenu(player);
    return true;
}
Also used : MenuItemPage(au.com.mineauz.minigames.menu.MenuItemPage) Menu(au.com.mineauz.minigames.menu.Menu)

Example 12 with MenuItemPage

use of au.com.mineauz.minigames.menu.MenuItemPage in project Minigames by AddstarMC.

the class PlayerScoreRangeCondition method displayMenu.

@Override
public boolean displayMenu(MinigamePlayer player, Menu prev) {
    Menu m = new Menu(3, "Score Range", player);
    m.addItem(min.getMenuItem("Min Score", Material.STEP));
    m.addItem(max.getMenuItem("Max Score", Material.STONE));
    m.addItem(new MenuItemPage("Back", Material.REDSTONE_TORCH_ON, prev), m.getSize() - 9);
    addInvertMenuItem(m);
    m.displayMenu(player);
    return true;
}
Also used : MenuItemPage(au.com.mineauz.minigames.menu.MenuItemPage) Menu(au.com.mineauz.minigames.menu.Menu)

Example 13 with MenuItemPage

use of au.com.mineauz.minigames.menu.MenuItemPage in project Minigames by AddstarMC.

the class PlayerXPRangeCondition method displayMenu.

@Override
public boolean displayMenu(MinigamePlayer player, Menu prev) {
    Menu m = new Menu(3, "XP Range", player);
    m.addItem(min.getMenuItem("Min XP", Material.STEP, 0.5, 1, 0.0, null));
    m.addItem(max.getMenuItem("Max XP", Material.STONE, 0.5, 1, 0.0, null));
    m.addItem(new MenuItemPage("Back", Material.REDSTONE_TORCH_ON, prev), m.getSize() - 9);
    addInvertMenuItem(m);
    m.displayMenu(player);
    return true;
}
Also used : MenuItemPage(au.com.mineauz.minigames.menu.MenuItemPage) Menu(au.com.mineauz.minigames.menu.Menu)

Example 14 with MenuItemPage

use of au.com.mineauz.minigames.menu.MenuItemPage in project Minigames by AddstarMC.

the class RandomChanceCondition method displayMenu.

@Override
public boolean displayMenu(MinigamePlayer player, Menu prev) {
    Menu m = new Menu(3, "Random Chance", player);
    m.addItem(new MenuItemPage("Back", Material.REDSTONE_TORCH_ON, prev), m.getSize() - 9);
    m.addItem(chance.getMenuItem("Percentage Chance", Material.EYE_OF_ENDER, 1, 99));
    addInvertMenuItem(m);
    m.displayMenu(player);
    return true;
}
Also used : MenuItemPage(au.com.mineauz.minigames.menu.MenuItemPage) Menu(au.com.mineauz.minigames.menu.Menu)

Example 15 with MenuItemPage

use of au.com.mineauz.minigames.menu.MenuItemPage in project Minigames by AddstarMC.

the class SwapBlockAction method displayMenu.

@Override
public boolean displayMenu(MinigamePlayer player, Menu previous) {
    Menu m = new Menu(3, "Swap Block", player);
    m.addItem(new MenuItemPage("Back", Material.REDSTONE_TORCH_ON, previous), m.getSize() - 9);
    final MinigamePlayer fply = player;
    m.addItem(new MenuItemString("Match Block", Material.COBBLESTONE, new Callback<String>() {

        @Override
        public void setValue(String value) {
            if (Material.matchMaterial(value.toUpperCase()) != null)
                matchType.setFlag(value.toUpperCase());
            else
                fply.sendMessage("Invalid block type!", "error");
        }

        @Override
        public String getValue() {
            return matchType.getFlag();
        }
    }));
    m.addItem(matchData.getMenuItem("Match Block Use Data?", Material.ENDER_PEARL));
    m.addItem(matchDataValue.getMenuItem("Match Block Data Value", Material.EYE_OF_ENDER, 0, 15));
    m.addItem(new MenuItemNewLine());
    m.addItem(new MenuItemString("To Block", Material.STONE, new Callback<String>() {

        @Override
        public void setValue(String value) {
            if (Material.matchMaterial(value.toUpperCase()) != null)
                toType.setFlag(value.toUpperCase());
            else
                fply.sendMessage("Invalid block type!", "error");
        }

        @Override
        public String getValue() {
            return toType.getFlag();
        }
    }));
    m.addItem(toData.getMenuItem("To Block Use Data?", Material.ENDER_PEARL));
    m.addItem(toDataValue.getMenuItem("To Block Data Value", Material.EYE_OF_ENDER, 0, 15));
    m.addItem(keepAttachment.getMenuItem("Keep Attachment", Material.PISTON_BASE, MinigameUtils.stringToList("When on, and To Block Use Data is off;If the source and target block;types are both blocks that;attach to surfaces, this;attachment will be preserved")));
    m.displayMenu(player);
    return true;
}
Also used : MinigamePlayer(au.com.mineauz.minigames.MinigamePlayer) Callback(au.com.mineauz.minigames.menu.Callback) MenuItemPage(au.com.mineauz.minigames.menu.MenuItemPage) MenuItemNewLine(au.com.mineauz.minigames.menu.MenuItemNewLine) Menu(au.com.mineauz.minigames.menu.Menu) MenuItemString(au.com.mineauz.minigames.menu.MenuItemString) MenuItemString(au.com.mineauz.minigames.menu.MenuItemString)

Aggregations

Menu (au.com.mineauz.minigames.menu.Menu)55 MenuItemPage (au.com.mineauz.minigames.menu.MenuItemPage)55 ArrayList (java.util.ArrayList)18 Callback (au.com.mineauz.minigames.menu.Callback)17 MenuItemList (au.com.mineauz.minigames.menu.MenuItemList)11 MenuItemString (au.com.mineauz.minigames.menu.MenuItemString)11 InteractionInterface (au.com.mineauz.minigames.menu.InteractionInterface)9 MenuItem (au.com.mineauz.minigames.menu.MenuItem)9 MenuItemCustom (au.com.mineauz.minigames.menu.MenuItemCustom)9 MenuItemNewLine (au.com.mineauz.minigames.menu.MenuItemNewLine)9 MenuItemInteger (au.com.mineauz.minigames.menu.MenuItemInteger)8 MinigamePlayer (au.com.mineauz.minigames.MinigamePlayer)7 MenuItemBoolean (au.com.mineauz.minigames.menu.MenuItemBoolean)5 TeamColor (au.com.mineauz.minigames.minigame.TeamColor)5 MenuItemTime (au.com.mineauz.minigames.menu.MenuItemTime)4 MenuItemDecimal (au.com.mineauz.minigames.menu.MenuItemDecimal)2 MinigameTool (au.com.mineauz.minigames.tool.MinigameTool)2 MenuItemCondition (au.com.mineauz.minigamesregions.menuitems.MenuItemCondition)2 MenuItemConditionAdd (au.com.mineauz.minigamesregions.menuitems.MenuItemConditionAdd)2 HashMap (java.util.HashMap)2