# VoiceHub

# VoiceHub

A full-featured **voice channel system** for Hytale servers. Think Discord/TeamSpeak built directly into the game — players can create channels, join voice groups, and communicate without external tools.

**Main Command:** `/ksvoice` (Aliases: `vc`, `voicehub`)

---

## Features at a Glance

### Voice Channels
Create and join voice channels with different types:

| Type | Description |
|------|-------------|
| **Group** | All members hear each other regardless of distance |
| **Whisper** | Private 1-on-1 conversation (max 2 players) |
| **Moderated** | Only players with talk power can speak |
| **Global** | Server-wide channel |
| **Proximity** | Distance-based — only nearby players hear you |

### Talk Power System
Moderated channels require **talk power** to speak:
- Members can **request** talk power with a reason
- Owner/Mods **grant or revoke** talk power via UI buttons
- Owner and Moderators always have talk power

### Channel Customization
- **Password protection** — SHA-256 hashed
- **Invite-only** mode
- **Custom range** — set hearing distance per channel (0 = unlimited)
- **Description** — visible in channel detail
- **Max members** — configurable limit

### Voice Isolation
Players in different channels are completely isolated:
- Channel members only hear each other
- Proximity players don't hear channel members and vice versa
- Powered by a custom VoiceRouter hook

### Text Chat
Type `!vc <message>` to send a text message to your voice channel members only.

### Admin Panel
Full admin dashboard accessible via `/ksvoice admin panel`:
- Real-time statistics (channels, users, online, voice status)
- Channel management with detail view
- Proximity settings (range, volume)
- Voice ban/blacklist system with timed bans

### Player UI
Two-panel browser accessible via `/ksvoice open`:
- **Left panel**: Channel list with create tab
- **Right panel**: My Channel with members, settings, and talk power controls
- HyVatar player avatars in member list

---

## Quick Start

1. Install the VoiceHub JAR in your server's `mods/` folder
2. Start the server — default config and channels are created automatically
3. Players use `/ksvoice open` or `/voicehub` to open the channel browser
4. Create a channel, invite friends, and start talking!

---

## Known Limitations

- **Cross-world voice** is not supported — Hytale's QUIC voice streams are world-scoped. Players in different worlds cannot hear each other through channels. A warning is shown when this occurs.
- **Voice needs the server's voice module** — if it is not available, the channel system works but voice routing is disabled. VoiceHub 1.2.4 is built for Hytale 0.7.x.