use of com.bencodez.advancedcore.api.inventory.BInventoryButton in project VotingPlugin by Ben12345rocks.
the class AdminVoteVoteShopItems method onChest.
@Override
public void onChest(Player player) {
BInventory inv = new BInventory("Edit VoteShop Items");
inv.requirePermission("VotingPlugin.Commands.AdminVote.Edit.VoteShop");
for (String identifier : plugin.getGui().getChestShopIdentifiers()) {
inv.addButton(new BInventoryButton(new ItemBuilder(plugin.getGui().getChestShopIdentifierSection(identifier))) {
@Override
public void onClick(ClickEvent clickEvent) {
new AdminVoteVoteShopItem(plugin, clickEvent.getPlayer(), (String) getData("ident")).open(GUIMethod.CHEST);
}
}.addData("ident", identifier));
}
inv.openInventory(player);
}
Aggregations