SpawnFilter
SpawnFilter is a lightweight, server-side Fabric mod that stops new players from spawning on top of blocks that will instantly kill them or otherwise ruin their first few seconds in the world.
If you've ever set up a server and watched everyone spawn on top of trees, in lava, or on magma blocks, this fixes that.
How It Works
When a player joins for the first time, SpawnFilter looks at the block underneath them. If that block is on the blocklist, the mod searches outward for a nearby safe surface spot, teleports the player there, and updates their spawn point so they respawn there too.
It only does this once per player. After the first join, the player gets a flag saved to their NBT (spawnfilter:hasSpawned) and the mod leaves them alone from that point on.
Defaults
Out of the box, SpawnFilter blocks spawns on:
Individual blocks
minecraft:waterminecraft:lavaminecraft:magma_block
Block tags
#minecraft:fire#minecraft:wool#c:fluids#minecraft:leaves
Installation
Drop the jar in your server's mods folder along with Fabric API. That's it. The mod runs on the server side, so clients don't need it installed unless you also want the fix to apply in Singleplayer.
Supported Versions
| Minecraft Version | Mod Loader |
|---|---|
| 1.20.1 | Fabric |
| 1.21.x | Fabric |
| 26.1.x | Fabric |
Requires Fabric API.