# SpeedHG > **A Spigot / Paper plugin for the *SpeedHG* Hunger-Games variant by McScrims Network.** > Built with Kotlin · Paper API 1.21 · Version `1.0.0` --- ## Table of Contents - [Overview](#overview) - [Dependencies](#dependencies) - [Game Flow](#game-flow) - [Configuration](#configuration) - [Kits](#kits) - [Perks](#perks) - [Commands](#commands) - [Permissions](#permissions) - [Architecture](#architecture) - [Adding a New Kit](#adding-a-new-kit) - [Adding a New Perk](#adding-a-new-perk) - [Runtime Configuration via `SPEEDHG_CUSTOM_SETTINGS`](#runtime-configuration-via-speedhg_custom_settings) --- ## Overview SpeedHG is a competitive Hunger-Games game-mode where every player selects a **Kit** (with an Aggressive or Defensive playstyle) and up to **2 passive Perks** before the round starts. The world border steadily shrinks, disasters trigger, and a feast spawns mid-game to force confrontation. Key features at a glance: - 17 fully-implemented Kits, each with 2 Playstyles (Aggressive / Defensive) - 14 passive Perks with persistent DB-backed selection - Hit-charge system for active abilities (configurable hits-to-charge per kit) - Dynamic WorldBorder shrink, Feast, and Pit events - Anti-runner detection, soup-based healing, team support - Lunar Client integration (waypoints, scoreboard) - Discord webhook for game results - MySQL-backed stats, ranking, and leaderboard - Fully i18n-able via `en_US.yml` (MiniMessage format) --- ## Dependencies | Dependency | Role | |-----------------|-------------------------------------| | `WorldEdit` | Arena construction for GladiatorKit | | `Apollo-Bukkit` | Lunar Client integration | | `Kup` | Internal rank/permission bridge | All three must be present on the server; the plugin will not load without them. --- ## Game Flow ``` LOBBY → STARTING → INVINCIBILITY → INGAME → ENDING ``` | Phase | Description | |-----------------|------------------------------------------------------------------------------------------| | `LOBBY` | Waiting for `min-players`. Every 15 s an idle message is broadcast. | | `STARTING` | Countdown (`lobby-time` seconds). Aborts if player count drops. | | `INVINCIBILITY` | Players are teleported, kits & perks applied, Speed I + Haste I active. No damage dealt. | | `INGAME` | Combat enabled, WorldBorder shrinks, timer counts up, Feast & Pit events fire. | | `ENDING` | Winner announced, server shuts down after a short delay. | Default timing values (overridable in `config.yml`): | Setting | Default | |--------------------|------------| | Min players | 8 | | Lobby time | 120 s | | Invincibility time | 120 s | | Border start | 600 blocks | | Border end | 150 blocks | | Border shrink time | 900 s | --- ## Configuration ### `config.yml` ```yaml game: beta: true min-players: 2 lobby-time: 60 invincibility-time: 120 border-start: 600.0 border-end: 100.0 border-shrink-time: 900 # seconds max-radius-teleport: 50.0 ranked: false teams: enabled: false preset-count: 10 max-size: 2 anti-runner: enabled: false discord: enabled: false webhook-url: "YOUR_WEBHOOK_URL" database: host: "localhost" port: 3306 name: "speedhg" username: "speedhg_user" password: "your_password" use-ssl: false pool: max-size: 10 min-idle: 2 ``` ### `SPEEDHG_CUSTOM_SETTINGS` Environment Variable For production overrides without touching `config.yml`, pass a JSON blob via environment variable (see [Runtime Configuration](#runtime-configuration-via-speedhg_custom_settings)). --- ## Kits Players select a kit in the lobby and choose a **Playstyle** (Aggressive `[AGG]` / Defensive `[DEF]`). Active abilities are triggered by right-clicking the kit item. Most abilities require a configurable number of hits to charge first (`global_hits_required`, default: 15). | Kit | Aggressive Active | Defensive Active | Passive (AGG) | Passive (DEF) | |------------------|----------------------------------------------------------------|---------------------------------------------------------|----------------------------------------------|-------------------------------------------------| | **Anchor** | Summon Iron Golem anchor — no-knock + bonus damage in radius | ← same | Partial knockback resistance | Partial knockback resistance | | **Armorer** | — | — | Strength I on kill | Protection I on armor | | **Backup** | — | — | — | — | | **BlackPanther** | Wakanda Leap — leap forward, hit enemies on land | ← same | — | — | | **Blitzcrank** | Rocket Grab — pull nearest enemy to you | ← same | — | — | | **Gladiator** | Sky arena 1v1 duel (glass cage, Wither IV after 180 s) | ← same | — | — | | **Goblin** | Steal enemy kit for 60 s | Spawn a bunker for cover | — | — | | **IceMage** | Ice Spike Burst — cone of freezing projectiles | Freeze Burst — 16 snowballs in circle | Speed in cold biomes, slowness chance on hit | 33 % slowness proc on being hit | | **Ninja** | Vanish + backstab: teleport behind last-hit enemy | Shadow Step: teleport to nearest enemy | Last-hit tracking | — | | **Puppet** | Puppet Trap — summon entity traps | ← similar | — | — | | **Rattlesnake** | Pounce — sneak-charge then leap, applies Poison II | — | Poison II on pounce hit | 25 % reflect Poison II on being hit | | **Spielo** | — | — | — | — | | **Tesla** | Lightning strike AoE | ← same | — | Knock-back + ignite reflect on being hit | | **TheWorld** | Shockwave + 3× Blink forward | Shockwave + Freeze nearby enemies (10 s, 5-hit cap) | — | Frozen enemies have a 5-hit break cap | | **Trident** | Dive — launch up, lightning on landing (charge-based) | — | — | Parry — chance to bounce + Slowness on attacker | | **Venom** | Venom Blast — Blindness I + Wither I + 2 hearts instant damage | Barrier — absorbs up to 15 damage, reflects projectiles | — | — | | **Voodoo** | Curse — apply Glowing + delayed damage to nearby enemies | ← similar | 20 % Wither proc on hit | Speed + Regen while cursed enemies are nearby | ### Kit Item Each kit provides its signature item in the player's inventory at game start. Items are tracked in `cachedItems` (UUID → `List`) and cleaned up on `onRemove`. --- ## Perks Players may equip **up to 2 Perks** before the round starts. Selections are persisted to the database per-player UUID. | Perk | Effect | |-------------------|-------------------------------------------------------------------------------------| | **Adrenaline** | Dropping below 3 hearts → Speed II for 5 s (30 s cooldown) | | **Berserker** | Below 4 hearts → deal 15 % more melee damage | | **Bloodlust** | On kill: Speed I + Regen I for 5 s | | **Enderblood** | Ender Pearl landings deal no fall damage | | **Evasion** | 15 % chance to dodge incoming projectiles | | **Featherweight** | Full immunity to fall damage | | **Ghost** | Invisible to compass tracking and the Oracle perk | | **Gourmet** | Consuming soup → Regen I + Speed I for 2 s | | **Last Stand** | Taking damage below 3 hearts → Resistance II + Absorption I for 4 s (60 s cooldown) | | **Momentum** | Sprint for 4 s without combat → Speed I | | **Oracle** | Shows kit + distance to the nearest enemy on sneak / compass | | **Pyromaniac** | Immune to fire, lava, magma blocks, and burn ticks | | **Scavenger** | Every kill drops an extra Golden Apple at the corpse | | **Vampire** | 10 % chance on melee hit to heal ½ heart | --- ## Commands | Command | Alias | Permission | Description | |--------------------------------------------|------------------|-------------------------|-----------------------------------| | `/kit ` | — | — | Select a kit via command | | `/kitinfo ` | `/perkinfo ` | — | Show name + lore of a kit or perk | | `/perks` | — | — | Open the Perk Selector GUI | | `/leaderboard` | — | — | View the top 10 players | | `/timer