Skip to main content
← Blog

August 2, 2026 · The Minely team

How to make a dungeons plugin with AI (instances, checkpoints, loot chests)

Dungeons are instanced PvE: a party enters, fights room by room, and earns the chest at the end. The engineering is instancing (your party, your dungeon) and pacing (waves, checkpoints, loot), and it turns a static map into infinitely replayable content.

What a dungeons plugin actually is

A dungeons plugin creates per-party instances of a dungeon map. Inside, rooms spawn mob waves, checkpoints save progress, and an end chest pays tiered loot on completion. Deaths respawn at the last checkpoint; finishing resets the instance for the next party.

How it works under the hood

An instance is a dungeon record: party members, current room, checkpoint, state. Rooms are regions with wave definitions (mob types, counts, spawn points) that trigger on entry. Checkpoints are regions that save the party's progress when cleared. The instance lifecycle — create on join, run rooms, pay out, teardown — mirrors the arena state machine with a PvE flavor. Mob caps per room keep performance predictable.

The prompt that builds it

You do not have to write this yourself. A precise description is enough:

a dungeons plugin with /dungeon join, instanced rooms with mob waves, checkpoint respawns, an end chest with tiered loot, and automatic instance reset

Name the commands, the permissions, and the exact messages players see. Precision here is what makes the first build land close.

Building it in the right order

  1. Build the instance model with party, room, and checkpoint state.
  2. Implement wave spawning per room with caps.
  3. Add checkpoints and the respawn-on-death rule.
  4. Wire the end chest with tiered loot.
  5. Handle teardown: disconnects, completions, and resets.

The details that matter in production

In production, the first thing you learn is that the happy path is the easy half. The edges are where the work lives: restarts, protection interactions, full inventories, and players who treat every system like an exploit puzzle. Build for those from day one and the launch weekend is quiet instead of a fire drill.

Storage and cleanup deserve special attention. Write state as it changes rather than on shutdown, clear per-player state on quit and on world change, and make every admin-facing action leave an audit line. The first time something goes wrong, those records are the difference between a two-minute review and an evening of guessing.

Finally, test like a hostile user. Spam-click every GUI, rejoin mid-action, try the command with no permission and with every permission, and run it while the server is under load. The bugs that survive that pass are the ones worth shipping.

Tuning it after the first build

Three to five rooms is a dungeon; ten is a chore. Wave sizes of 4 to 10 mobs with a boss-ish final room. Loot tiers: everyone gets the base tier, speed or no-death clears pay a bonus tier. Entry costs (a key or money) turn dungeons into a healthy sink.

Tips that save you a rebuild

  • Cap mobs per room and per instance before anything else — this is the lag dial.
  • Telegraph waves with a countdown so rooms never feel unfair.
  • Handle party disconnects by pausing the instance briefly, not instant-failing.
  • Log clear times; the median tells you if the dungeon is too long.

Questions people ask

Can players solo it?

Yes — scale wave sizes to party size, so solos and groups both get a fair run.

How do I add a second dungeon?

Ask for a new dungeon definition with its own rooms, waves, and loot — the instance engine is shared.

What about a hard mode?

A hard flag with stronger mobs and a better loot tier, unlocked after a first clear.

The fastest way to check this guide is to build the thing. One prompt, one live build stream, one working jar. Start free.