> ## Documentation Index
> Fetch the complete documentation index at: https://docs.minestorecms.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Game Type

> Switch the visual style of player avatars between Minecraft and Hytale across your webstore.

## **Introduction**

The **Game Type** setting controls **which avatar service** the webstore uses when rendering player heads, bodies and helmets. It is purely visual — package delivery, RCON / plugin commands, and any Minecraft-specific behaviour stay untouched.

<Info>
  Set this once during initial setup. The choice is cached for 5 minutes after changes — a fresh switch may take a moment to propagate.
</Info>

## **Choosing a Game Type**

To configure the game type:

<Steps>
  <Step title={'Go to the Admin Panel'}>
    Click on the **Admin Panel**.
  </Step>

  <Step title={'Navigate to Settings → Game Type'}>
    Click on the **Settings** tab in the sidebar, then open the **Game Type** sub-section.
  </Step>

  <Step title={'Select a Game'}>
    Choose **Minecraft** or **Hytale** with the radio buttons.
  </Step>

  <Step title={'Save Changes'}>
    Click on the **Save Changes** button.
  </Step>
</Steps>

## **Available Options**

| **Game Type** | **Avatar Services Used**                                                                      |
| ------------- | --------------------------------------------------------------------------------------------- |
| **Minecraft** | `mc-heads.net` (head, body) and `minotar.net` (helm, armor bust). Default for fresh installs. |
| **Hytale**    | `hyvatar.io` for every avatar kind (head, body, helm, bust, guest placeholder).               |

## **Where the Setting Affects Rendering**

The selected service is used everywhere the platform renders a player avatar:

* **Header / user bar** — the user's head icon in the top-right corner.
* **Admin Customers list** — head icon next to each customer row.
* **Customer detail page** — large body render at the top of the profile.
* **Statistics dashboards** — head icons in top-spender / top-player tables.
* **Checkout** — recipient avatar when buying a gift.
* **Default frontend store pages** — wherever a username is shown.

<Check>
  The same setting drives both server-rendered Blade avatars and the frontend's `<Avatar />` / `<ServerAvatar />` components — switching it in one place updates the entire site.
</Check>

## **For Theme Developers**

If you are building a custom theme or template, render avatars using the helper rather than hard-coding `mc-heads.net` URLs.

### Frontend components

The default Next.js frontend exposes two components in `@/components/base/avatar/`:

* **`<Avatar />`** — client-side, reads the current game type from the settings store via the `useGameType()` hook.
* **`<ServerAvatar />`** — server-rendered, takes the game type as a prop.

Both delegate URL construction to the shared `buildAvatarUrl()` helper in `@/lib/avatar.ts`, which mirrors the backend `AvatarHelper` exactly.

<Warning>
  Do **not** hard-code `mc-heads.net` or any other avatar service in your theme — when a store owner switches Game Type, hard-coded URLs will not follow and players will see a broken icon.
</Warning>
