Search in sources :

Example 1 with MenuItemBack

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

the class TakeItemAction method displayMenu.

@Override
public boolean displayMenu(final MinigamePlayer player, Menu previous) {
    Menu m = new Menu(3, "Give Item", player);
    m.addItem(new MenuItemBack(previous), m.getSize() - 9);
    m.addItem(new MenuItemString("Type", Material.STONE, new Callback<String>() {

        @Override
        public void setValue(String value) {
            if (Material.getMaterial(value.toUpperCase()) != null) {
                type.setFlag(value.toUpperCase());
            } else
                player.sendMessage("Invalid item type!", "error");
        }

        @Override
        public String getValue() {
            return type.getFlag();
        }
    }));
    m.addItem(count.getMenuItem("Count", Material.STEP, 1, 64));
    m.addItem(damage.getMenuItem("Damage", Material.COBBLESTONE, 0, null));
    m.addItem(matchDamage.getMenuItem("Match Damage", Material.ENDER_PEARL));
    m.displayMenu(player);
    return true;
}
Also used : Callback(au.com.mineauz.minigames.menu.Callback) MenuItemBack(au.com.mineauz.minigames.menu.MenuItemBack) Menu(au.com.mineauz.minigames.menu.Menu) MenuItemString(au.com.mineauz.minigames.menu.MenuItemString) MenuItemString(au.com.mineauz.minigames.menu.MenuItemString)

Example 2 with MenuItemBack

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

the class VelocityAction method displayMenu.

@Override
public boolean displayMenu(MinigamePlayer player, Menu previous) {
    Menu m = new Menu(3, "Velocity", player);
    m.addItem(new MenuItemBack(previous), m.getSize() - 9);
    m.addItem(x.getMenuItem("X Velocity", Material.STONE, 0.5d, 1d, null, null));
    m.addItem(y.getMenuItem("Y Velocity", Material.STONE, 0.5d, 1d, null, null));
    m.addItem(z.getMenuItem("Z Velocity", Material.STONE, 0.5d, 1d, null, null));
    m.displayMenu(player);
    return true;
}
Also used : MenuItemBack(au.com.mineauz.minigames.menu.MenuItemBack) Menu(au.com.mineauz.minigames.menu.Menu)

Example 3 with MenuItemBack

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

the class TriggerRandomAction method displayMenu.

@Override
public boolean displayMenu(MinigamePlayer player, Menu previous) {
    Menu m = new Menu(3, "Trigger Random", player);
    m.addItem(new MenuItemBack(previous), m.getSize() - 9);
    m.addItem(timesTriggered.getMenuItem("Times to Trigger Random", Material.COMMAND, 1, null));
    m.addItem(randomPerTrigger.getMenuItem("Allow Same Executor", Material.ENDER_PEARL, MinigameUtils.stringToList("Should there be a chance;that the same execeutor;can be triggered more?")));
    m.displayMenu(player);
    return true;
}
Also used : MenuItemBack(au.com.mineauz.minigames.menu.MenuItemBack) Menu(au.com.mineauz.minigames.menu.Menu)

Example 4 with MenuItemBack

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

the class BroadcastAction method displayMenu.

@Override
public boolean displayMenu(MinigamePlayer player, Menu previous) {
    Menu m = new Menu(3, "Broadcast", player);
    m.addItem(new MenuItemBack(previous), m.getSize() - 9);
    m.addItem(message.getMenuItem("Message", Material.NAME_TAG));
    m.addItem(excludeExecutor.getMenuItem("Don't Send to Executor", Material.ENDER_PEARL));
    m.addItem(redText.getMenuItem("Red Message", Material.ENDER_PEARL));
    m.displayMenu(player);
    return true;
}
Also used : MenuItemBack(au.com.mineauz.minigames.menu.MenuItemBack) Menu(au.com.mineauz.minigames.menu.Menu)

Example 5 with MenuItemBack

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

the class LightningAction method displayMenu.

@Override
public boolean displayMenu(MinigamePlayer player, Menu previous) {
    Menu m = new Menu(3, "Lightning", player);
    m.addItem(new MenuItemBack(previous), m.getSize() - 9);
    m.addItem(effect.getMenuItem("Effect Only", Material.ENDER_PEARL));
    m.displayMenu(player);
    return true;
}
Also used : MenuItemBack(au.com.mineauz.minigames.menu.MenuItemBack) Menu(au.com.mineauz.minigames.menu.Menu)

Aggregations

Menu (au.com.mineauz.minigames.menu.Menu)13 MenuItemBack (au.com.mineauz.minigames.menu.MenuItemBack)13 Callback (au.com.mineauz.minigames.menu.Callback)3 InteractionInterface (au.com.mineauz.minigames.menu.InteractionInterface)2 MenuItemCustom (au.com.mineauz.minigames.menu.MenuItemCustom)2 MenuItemString (au.com.mineauz.minigames.menu.MenuItemString)2 ArrayList (java.util.ArrayList)2 RewardScheme (au.com.mineauz.minigames.minigame.reward.scheme.RewardScheme)1 StandardRewardScheme (au.com.mineauz.minigames.minigame.reward.scheme.StandardRewardScheme)1