use of au.com.mineauz.minigames.minigame.reward.RewardType in project Minigames by AddstarMC.
the class MenuItemRewardGroup method onDoubleClick.
@Override
public ItemStack onDoubleClick() {
Menu rewardMenu = new Menu(5, getName(), getContainer().getViewer());
rewardMenu.setPreviousPage(getContainer());
List<String> des = new ArrayList<String>();
des.add("Click this with an item");
des.add("to add it to rewards.");
des.add("Click without an item");
des.add("to add a money reward.");
rewardMenu.addItem(new MenuItemRewardAdd("Add Item", des, Material.ITEM_FRAME, group), 43);
rewardMenu.addItem(new MenuItemPage("Save " + getName(), Material.REDSTONE_TORCH_ON, rewardMenu.getPreviousPage()), 44);
List<String> list = new ArrayList<String>();
for (RewardRarity r : RewardRarity.values()) {
list.add(r.toString());
}
List<MenuItem> mi = new ArrayList<MenuItem>();
for (RewardType item : group.getItems()) {
mi.add(item.getMenuItem());
}
rewardMenu.addItems(mi);
rewardMenu.displayMenu(getContainer().getViewer());
return null;
}
Aggregations