# Spawn & Homes
**Summary:**
> An operator picks the exact server spawn, everyone gets a "Back to spawn" button in the pause menu, and each player can set up to 10 homes from a "My homes" screen — never during combat.
---
## Why
- **No more /spawn guesswork**: vanilla only stores a spawn block, not where you look or which dimension you land in.
- **Homes without a heavy essentials mod**: a small, focused mod with a real menu instead of memorising commands.
- **No combat escapes**: teleporting out of a fight is blocked server-side.
## What it does
- **Operator-chosen spawn**: `/definirspawn` saves your exact position, height, facing (yaw and pitch) and dimension, or type them in by hand.
- **Back to spawn**: a button in the pause menu (or `/spawn`), 5 minute cooldown shown on the button.
- **10 homes per player**: named by the player, saved with exact position and facing.
- **My homes screen**: list with dimension and coordinates, Go, delete (double click), set or move a home at your position.
- **Fair rules**: refused in combat (hit or hurt by a mob or player in the last 2 minutes), 3 s stand-still warm-up cancelled by moving or damage, blocked while falling, gliding or in blocked dimensions.
- **Persistent cooldowns**: real-time, kept across restarts and disconnects, only consumed when the teleport happens.
## Commands
| Command | Permission | Description |
|---|---|---|
| `/spawn` | Everyone | Teleport to the server spawn |
| `/home <name>` | Everyone | Teleport to one of your homes |
| `/sethome <name>` | Everyone | Create (or move) a home at your position |
| `/delhome <name>` | Everyone | Delete a home |
| `/homes` | Everyone | Clickable list of your homes |
| `/definirspawn [x y z] [yaw pitch] [dimension]` | Op (2) | Set the spawn (no argument: your position and facing) |
| `/spawnmaisons info` | Op (2) | Show the current spawn |
| `/spawnmaisons reset <player>` | Op (2) | Reset a player's cooldowns |
## Configuration
File: `serverconfig/spawnmaisons-server.toml`
| Option | Default | Description |
|---|---|---|
| `spawnCooldownSeconds` | 300 | Cooldown between two spawn teleports (seconds) |
| `homeCooldownSeconds` | 60 | Cooldown between two home teleports (seconds) |
| `maxHomes` | 10 | Homes per player |
| `combatSeconds` | 120 | Combat window that blocks teleporting (seconds) |
| `warmupSeconds` | 3 | Stand-still time before leaving (0 = instant) |
| `opsBypassCooldown` | false | Operators ignore cooldowns |
| `alsoSetWorldSpawn` | true | Setting the spawn in the Overworld also sets the world spawn |
| `blockedDimensions` | `["raidsillama:arenes"]` | Dimensions you can't leave from or set homes in |
## Installation
- **Client and server**: install on the server and on every client (players without the mod can still use the commands, but get no buttons or screen).
- Requires NeoForge 21.1.x for Minecraft 1.21.1. No other dependency.

