public void openKitMenu(ArcadePlayer player) { Player rawPlayer = player.getPlayer(); Inventory inv = Bukkit.createInventory( null, ArcadeHandler.getInstance().getCurrentGame().getKits().size(), "Pick your kits!"); for (Kit kit : ArcadeHandler.getInstance().getCurrentGame().getKits()) { inv.addItem( new ItemBuilder( kit.getDisplayItem().getType(), 1, kit.getName(), (short) 0, kit.getDesc()) .build()); } rawPlayer.openInventory(inv); }
public Kit getKit(ArcadePlayer player) { if (playerKits.get(player) != null) { return playerKits.get(player); } else { return ArcadeHandler.getInstance().getCurrentGame().getKits().get(0); } }