use of au.com.mineauz.minigames.minigame.reward.scheme.RewardScheme in project Minigames by AddstarMC.
the class RewardsModule method createSubMenu.
private Menu createSubMenu(final Menu parent) {
final Menu submenu = new Menu(6, "Reward Settings", parent.getViewer());
scheme.addMenuItems(submenu);
submenu.addItem(RewardSchemes.newMenuItem("Reward Scheme", Material.PAPER, new Callback<Class<? extends RewardScheme>>() {
@Override
public void setValue(Class<? extends RewardScheme> value) {
scheme = RewardSchemes.createScheme(value);
// Update the menu
Menu menu = createSubMenu(parent);
menu.displayMenu(submenu.getViewer());
}
@Override
public Class<? extends RewardScheme> getValue() {
return scheme.getClass();
}
}), submenu.getSize() - 1);
submenu.addItem(new MenuItemBack(parent), submenu.getSize() - 9);
return submenu;
}
Aggregations