use of au.com.mineauz.minigames.menu.MenuItemTeam in project Minigames by AddstarMC.
the class TeamsModule method addEditMenuOptions.
@Override
public void addEditMenuOptions(Menu menu) {
Menu m = new Menu(6, "Teams", menu.getViewer());
m.setPreviousPage(menu);
List<MenuItem> items = new ArrayList<MenuItem>();
List<String> teams = new ArrayList<String>(this.teams.size() + 1);
for (TeamColor t : this.teams.keySet()) {
teams.add(MinigameUtils.capitalize(t.toString().replace("_", " ")));
}
teams.add("None");
items.add(new MenuItemList("Default Winning Team", Material.PAPER, getDefaultWinnerCallback(), teams));
items.add(new MenuItemNewLine());
for (Team t : this.teams.values()) {
items.add(new MenuItemTeam(t.getChatColor() + t.getDisplayName(), t));
}
m.addItem(new MenuItemAddTeam("Add Team", getMinigame()), m.getSize() - 1);
m.addItems(items);
m.addItem(new MenuItemPage("Back", Material.REDSTONE_TORCH_ON, menu), m.getSize() - 9);
MenuItemPage p = new MenuItemPage("Team Options", Material.CHEST, m);
menu.addItem(p);
}
Aggregations