use of au.com.mineauz.minigames.minigame.TeamColor in project Minigames by AddstarMC.
the class SetTeamScoreAction method displayMenu.
@Override
public boolean displayMenu(MinigamePlayer player, Menu previous) {
Menu m = new Menu(3, "Set Team Score", player);
m.addItem(new MenuItemPage("Back", Material.REDSTONE_TORCH_ON, previous), m.getSize() - 9);
m.addItem(score.getMenuItem("Set Score Amount", Material.STONE, 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