# Player UI

# Player UI

VoiceHub provides two in-game UI pages: the **Channel Browser** for players and the **Admin Panel** for administrators. Both are built with Hytale's InteractiveCustomUIPage system.

## Channel Browser

Open with `/ksvoice open` (aliases: `menu`, `ui`). Every player can open it.

The Channel Browser uses a split layout:
- **Left panel** -- Channel list or Create tab (switchable via tabs)
- **Right panel** -- Your current channel details

### Left Panel: Channels Tab

The default tab shows all channels on the server in a paginated list (8 channels per page).

Each channel row displays:
- **Name** -- the channel display name
- **Type** -- Group, Whisper, Moderated, Global, or Proximity
- **Members** -- current count and limit (e.g. `3/20` or `5/inf`)
- **Flags** -- `[PW]` for password-protected, `[MOD]` for moderated, `[INV]` for invite-only

Click a channel to expand its **detail panel** inline:

| Field | Description |
|-------|-------------|
| Name | Channel display name |
| Description | Channel description text |
| Type | Full type description (e.g. "Group (worldwide)", "Proximity (64 blocks)") |
| Flags | Password, Moderated, Invite-Only indicators |
| Password field | Shown only if the channel is password-protected and you are not already a member |
| Join button | Join the selected channel (hidden if you are already in it) |

:::tip Admin Bypass
Players with the `kyuubisoft.voicehub.admin` permission bypass password and invite-only restrictions when joining through the UI.
:::

**Join error messages:**
- "Wrong password!" -- incorrect password entered
- "Channel full!" -- member limit reached
- "Invite only!" -- channel requires an invitation
- "Voice-banned! X min remaining" -- player is blacklisted
- "No permission!" -- channel has a join permission the player lacks

### Left Panel: Create Tab

Switch to the Create tab to make a new channel.

| Field | Description |
|-------|-------------|
| **Name** | Channel name (required, 2-32 characters, alphanumeric, spaces, hyphens, underscores) |
| **Description** | Optional description text |
| **Type** | Dropdown: Group, Whisper, or Moderated |
| **Password** | Optional password to protect the channel |

Below the type dropdown, a description of the selected type is shown:

| Type | Description |
|------|-------------|
| Group | All members hear each other worldwide |
| Whisper | Private 1-on-1 (max 2) |
| Moderated | Only talk-power holders can speak |

:::note
Global and Proximity types are not available in the Create dropdown -- Global channels are restricted by server config (`allowGlobalChannels`), and Proximity channels are created as default channels by the server.
:::

Click **Create** to create the channel and automatically join it. You become the channel owner.

### Right Panel: My Channel

The right panel shows your current channel information.

**When not in a channel:**
- Shows "Not in channel"

**When in a channel:**

| Section | Content |
|---------|---------|
| **Header** | Channel name, description, full type label, owner name |
| **Members** | Current count and limit |
| **Moderation** | "Moderated" label if applicable |
| **Leave** | Button to leave the channel (disabled for default channels) |

**Member List:**

Displays up to 8 members with:
- Player name (with a cross-mark indicator if the member is in a different world)
- Role badge: **O** = Owner, **M** = Moderator, music note = has talk power (in moderated channels)
- **Kick** button (visible to Owner/Moderator, not shown for yourself)
- **Talk Power** toggle button (visible to Owner/Moderator in moderated channels)
- **Avatar** -- player's HyVatar head render (first 6 slots, requires KyuubiSoft Core)

If there are more than 8 members, a "+N more" label appears.

**Cross-World Warning:**

When channel members are in different Hytale worlds, a warning banner appears:

> Players in other worlds cannot hear you.

This includes a count of how many members are affected.

### Talk Power Request (Moderated Channels)

When you are a regular member in a moderated channel and do not have talk power, a **Request Talk Power** section appears:

- **Reason** text field -- optional reason for your request
- **Request** button -- sends a notification to the channel's owner and moderators
- Mods see: `[VoiceHub] PlayerName requests talk power: reason`

### Owner Edit Section

When you are the channel owner, an **Edit** section appears below the member list:

| Field | Description |
|-------|-------------|
| **Name** | Rename the channel |
| **Description** | Update description |
| **Max Members** | Change the member limit |
| **Password** | Set or change password |
| **Type** | Dropdown: Group, Whisper, Moderated, Proximity |
| **Range** | Custom hearing range in blocks (0 = unlimited/global) |
| **Save** | Apply changes |
| **Delete** | Permanently delete the channel (all members moved to default) |

## Admin Panel

Open with `/ksvoice admin panel`. Requires the `kyuubisoft.voicehub.admin` permission.

See the [Admin Panel](./admin-panel.md) page for full documentation.

## Status Bar

At the top of the Channel Browser, a status label shows your current channel:
- `In: ChannelName` -- when you are in a channel
- `Not in channel` -- when you are not in any channel