use of au.com.mineauz.minigames.menu.MenuItemPage in project Minigames by AddstarMC.
the class ContainsOneTeamCondition method displayMenu.
@Override
public boolean displayMenu(MinigamePlayer player, Menu prev) {
Menu m = new Menu(3, "Contains One Team", player);
m.addItem(new MenuItemPage("Back", Material.REDSTONE_TORCH_ON, prev), m.getSize() - 9);
addInvertMenuItem(m);
m.displayMenu(player);
return true;
}
use of au.com.mineauz.minigames.menu.MenuItemPage in project Minigames by AddstarMC.
the class HasLoudOutCondition method displayMenu.
@Override
public boolean displayMenu(MinigamePlayer player, Menu prev) {
Menu m = new Menu(3, "Equip Loadout", player);
m.addItem(new MenuItemPage("Back", Material.REDSTONE_TORCH_ON, prev), m.getSize() - 9);
m.addItem(new MenuItemString("Loadout Name", Material.DIAMOND_SWORD, new Callback<String>() {
@Override
public void setValue(String value) {
loadOutName.setFlag(value);
}
@Override
public String getValue() {
return loadOutName.getFlag();
}
}));
m.displayMenu(player);
return true;
}
use of au.com.mineauz.minigames.menu.MenuItemPage in project Minigames by AddstarMC.
the class TriggerNodeAction method displayMenu.
@Override
public boolean displayMenu(MinigamePlayer player, Menu previous) {
Menu m = new Menu(3, "Trigger Node", player);
m.addItem(new MenuItemPage("Back", Material.REDSTONE_TORCH_ON, previous), m.getSize() - 9);
m.addItem(node.getMenuItem("Node Name", Material.EYE_OF_ENDER));
m.displayMenu(player);
return true;
}
use of au.com.mineauz.minigames.menu.MenuItemPage in project Minigames by AddstarMC.
the class RegionModule method displayMenu.
public void displayMenu(MinigamePlayer viewer, Menu previous) {
Menu rm = new Menu(6, "Regions and Nodes", viewer);
List<MenuItem> items = new ArrayList<MenuItem>(regions.size());
for (String name : regions.keySet()) {
MenuItemRegion mir = new MenuItemRegion(name, Material.CHEST, regions.get(name), this);
items.add(mir);
}
items.add(new MenuItemNewLine());
for (String name : nodes.keySet()) {
MenuItemNode min = new MenuItemNode(name, Material.CHEST, nodes.get(name), this);
items.add(min);
}
rm.addItems(items);
if (previous != null)
rm.addItem(new MenuItemPage("Back", Material.REDSTONE_TORCH_ON, previous), rm.getSize() - 9);
rm.displayMenu(viewer);
}
use of au.com.mineauz.minigames.menu.MenuItemPage in project Minigames by AddstarMC.
the class AddTeamScoreAction method displayMenu.
@Override
public boolean displayMenu(MinigamePlayer player, Menu previous) {
Menu m = new Menu(3, "Add Team Score", player);
m.addItem(new MenuItemPage("Back", Material.REDSTONE_TORCH_ON, previous), m.getSize() - 9);
m.addItem(new MenuItemInteger("Add Score Amount", Material.STONE, new Callback<Integer>() {
@Override
public void setValue(Integer value) {
score.setFlag(value);
}
@Override
public Integer getValue() {
return score.getFlag();
}
}, null, null));
List<String> teams = new ArrayList<>();
teams.add("None");
for (TeamColor team : TeamColor.values()) {
teams.add(MinigameUtils.capitalize(team.toString()));
}
m.addItem(new MenuItemList("Specific Team", MinigameUtils.stringToList("If 'None', the players;team will be used"), Material.PAPER, new Callback<String>() {
@Override
public void setValue(String value) {
team.setFlag(value.toUpperCase());
}
@Override
public String getValue() {
return MinigameUtils.capitalize(team.getFlag());
}
}, teams));
m.displayMenu(player);
return true;
}
Aggregations