vr3f3v
๐Ÿ“Ž 1 file 2,467 chars
๐Ÿ“„
pasted-code-1770971638492.txt
txt 56 lines
โ–ถ
**Role:**
Act as a Senior Java Minecraft Plugin Developer (Spigot/Paper API 1.20+).

**Task:**
Create a comprehensive, fully functional Hide and Seek plugin named "UltimateHideSeek".

**Core Configuration & Constraints:**
1.  **Player Limits:**
    * Minimum players to start: 10.
    * Maximum players: 20.
2.  **Roles:**
    * **Hiders (ืžืชื—ื‘ืื™ื):** The majority of the players.
    * **Seeker (ืกื•ืคืจ/ืžื•ืฆื):** Exactly one player, chosen randomly at the start.

**Locations (Warps) Management:**
The plugin must support setting locations via commands:
* `Lobby`: Where players wait before the game starts.
* `Arena`: The map where Hiders hide.
* `SeekerWait`: A small closed room where the Seeker waits while Hiders hide.

**Game Flow & Logic:**
1.  **Waiting State:** Players join the lobby. If players < 10, send a message "Waiting for players (X/10)".
2.  **Starting:**
    * Can be triggered automatically when 20 players join OR manually via command `/hs start`.
    * Upon start, randomly select 1 Seeker. Everyone else is a Hider.
3.  **Hiding Phase (Countdown):**
    * Teleport Hiders to `Arena`.
    * Teleport Seeker to `SeekerWait`.
    * Freeze the Seeker or keep them in the room for 30 seconds.
    * Send countdown titles to all players.
4.  **Hunting Phase:**
    * Release the Seeker (teleport to `Arena` or open door).
    * **Seeker Abilities:**
        * Must have a permanent **GLOWING** effect (so Hiders can see them).
        * Equipped with a Diamond Sword that kills Hiders in **ONE HIT** (Instant Kill).
    * **Hiders:** If hit by the Seeker, they are eliminated immediately (switched to Spectator mode or kicked to Lobby).
5.  **Game Over:**
    * If all Hiders are dead -> Seeker Wins.
    * If timer runs out (e.g., 5 minutes) -> Hiders Win.

**Commands:**
* `/hs join` - Join the game.
* `/hs start` - Force start the game (Admin only).
* `/hs setlobby` - Set the lobby location.
* `/hs setarena` - Set the hiders' spawn point.
* `/hs setseeker` - Set the seeker's waiting room.

**Technical Requirements:**
* Use the Singleton pattern for the Game Manager.
* Handle `EntityDamageByEntityEvent`: Check if damager is Seeker and victim is Hider -> Apply `setHealth(0)`.
* Handle `PlayerQuitEvent`: If Seeker quits, end game.
* Clean code with comments.
* No database required, keep everything in memory/config.yml.

Please provide the full source code, including `plugin.yml`, `Main.java`, `GameManager.java`, and `CommandManager.java`.
Kodari can make mistakes. Review important code before using.
Files

No files in this session

Code