use of au.com.mineauz.minigames.menu.MenuItemRewardAdd in project Minigames by AddstarMC.
the class Rewards method createMenu.
public Menu createMenu(String name, MinigamePlayer player, Menu parent) {
Menu rewardMenu = new Menu(5, name, player);
rewardMenu.setPreviousPage(parent);
rewardMenu.addItem(new MenuItemRewardGroupAdd("Add Group", Material.ITEM_FRAME, this), 42);
rewardMenu.addItem(new MenuItemRewardAdd("Add Item", Material.ITEM_FRAME, this), 43);
rewardMenu.addItem(new MenuItemPage("Save " + name, Material.REDSTONE_TORCH_ON, parent), 44);
List<MenuItem> mi = new ArrayList<MenuItem>();
for (RewardType item : items) {
mi.add(item.getMenuItem());
}
List<String> des = new ArrayList<String>();
des.add("Double Click to edit");
for (RewardGroup group : groups) {
MenuItemRewardGroup rwg = new MenuItemRewardGroup(group.getName() + " Group", des, Material.CHEST, group, this);
mi.add(rwg);
}
rewardMenu.addItems(mi);
return rewardMenu;
}
Aggregations