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

# Creating Minigames

> Build custom minigames with the Minekube AI assistant -- spleef, PvP arenas, parkour, treasure hunts, and more

# Creating Minigames

One of the most popular uses of Minekube AI is creating **custom minigames**. The AI builds complete game systems with arenas, teams, scoring, timers, and respawn logic -- all from a natural language description.

***

## Getting Started

Just describe the minigame you want:

```
create a spleef minigame
build a PvP arena with teams
make a parkour course with checkpoints and a timer
create a capture the flag game
```

The AI handles everything: building the arena with WorldEdit, writing the game logic in Skript, setting up commands, and testing it.

***

## Example Minigames

<AccordionGroup>
  <Accordion title="Spleef">
    **You say:**

    ```
    create a spleef game with:
    - snow arena that regenerates after each round
    - support for 2-8 players
    - /spleef join and /spleef leave commands
    - countdown before start
    - last player standing wins
    ```

    **The AI builds:**

    * A snow-layered arena using WorldEdit
    * Join/leave commands with player tracking
    * A countdown timer (3... 2... 1... GO!)
    * Fall detection to eliminate players
    * Winner announcement and arena reset
    * All as a single Skript with commands
  </Accordion>

  <Accordion title="King of the Hill">
    **You say:**

    ```
    make a king of the hill minigame where:
    - there's a gold block platform in the center
    - players get 1 point per second standing on it
    - first to 60 points wins
    - players respawn when killed
    - show scores on the sidebar
    ```

    **The AI builds:**

    * A hill structure with a gold block capture point
    * Point tracking with per-second scoring for the player on the hill
    * Scoreboard sidebar showing all player scores
    * Death/respawn handling
    * Win condition and game-end logic
  </Accordion>

  <Accordion title="Treasure Hunt">
    **You say:**

    ```
    build a treasure hunt game:
    - randomly place 20 hidden chests across the map
    - each chest has random loot
    - player who finds the most chests in 5 minutes wins
    - show a scoreboard with chest count
    ```

    **The AI builds:**

    * Random chest placement script
    * Loot table generation
    * Chest-found detection when opened
    * 5-minute game timer with announcements
    * Scoreboard tracking found chests per player
    * Winner announcement when time runs out
  </Accordion>

  <Accordion title="Parkour Course">
    **You say:**

    ```
    create a parkour course with:
    - 15 increasingly difficult jumps
    - checkpoints every 5 jumps
    - a timer that shows on the action bar
    - a /parkour start command
    - leaderboard for best times
    ```

    **The AI builds:**

    * Physical parkour structure using WorldEdit
    * Checkpoint system with pressure plates or regions
    * Action bar timer display
    * Fall detection that returns players to last checkpoint
    * Best-time tracking with a leaderboard command
  </Accordion>

  <Accordion title="Team PvP Arena">
    **You say:**

    ```
    build a team PvP arena:
    - red team vs blue team
    - team selection with /join red or /join blue
    - best of 5 rounds, 2 minute rounds
    - kit selection (archer, warrior, tank)
    - score display on sidebar
    ```

    **The AI builds:**

    * Arena structure with two team spawns
    * Team assignment and balancing
    * Kit system with class-specific gear
    * Round timer with automatic resets
    * Score tracking and sidebar display
    * Win condition and game summary
  </Accordion>
</AccordionGroup>

***

## Tips for Building Great Minigames

<AccordionGroup>
  <Accordion title="Start simple, then add features">
    Building iteratively gives the AI (and you) better results:

    ```
    make a basic PvP arena              <- Start with the core concept
    add team selection (red vs blue)     <- Layer on teams
    add a kill scoreboard                <- Add scoring
    make it best of 3 rounds             <- Add round structure
    add kit selection before each round   <- Add class selection
    ```

    Each step lets you test and refine before adding complexity. One massive request is harder for the AI to get right on the first try.
  </Accordion>

  <Accordion title="Be specific about the rules">
    The more detail you give about game rules, the better the result:

    ```
    -- Vague (AI has to guess everything)
    make a fun game

    -- Specific (AI knows exactly what to build)
    make a game where players collect wool from colored sheep,
    bring it to their base's crafting table, and first team to
    craft a full set of colored beds wins
    ```
  </Accordion>

  <Accordion title="Ask for WorldEdit structures">
    For arenas and maps, tell the AI to use WorldEdit:

    ```
    install WorldEdit and build a 50x50 PvP arena with
    stone walls, a lava moat, and 4 team spawn corners
    ```

    WorldEdit lets the AI build large structures quickly instead of placing blocks one by one.
  </Accordion>

  <Accordion title="Include player count and timing">
    Specifying player counts and timers helps the AI create proper game flow:

    ```
    - minimum 2 players to start
    - maximum 8 players
    - 30 second lobby countdown
    - 5 minute game rounds
    - 10 second break between rounds
    ```
  </Accordion>

  <Accordion title="Ask for player feedback elements">
    Good minigames communicate what is happening to players:

    ```
    add titles for "Round Start" and "Game Over"
    show the timer on the action bar
    play a sound when someone scores
    announce kills and eliminations
    show a scoreboard with team scores
    ```
  </Accordion>
</AccordionGroup>

***

## Testing Minigames

<Tip>
  You can test multiplayer minigames even when playing solo. Ask the AI to add test-friendly features:

  ```
  make the minigame start with just 1 player for testing
  add a /spleef forcestart command that skips the player minimum
  add a debug mode that shows game state in chat
  ```
</Tip>

You can also invite friends to test. Share your server address from the [dashboard](https://minekube.com/dashboard) and have them connect.

***

## Troubleshooting Minigames

If something is not working as expected, tell the AI what is wrong:

```
the spleef arena doesn't reset after a round
players don't respawn when they fall
the scoreboard isn't updating
the game starts before enough players join
the countdown timer shows the wrong number
```

The AI reads the Skript, identifies the issue, fixes it, and reloads -- usually in under 30 seconds.
