
FakePlayer
Make a server-side mod that creates a fake player to keep the server on with 1 player active always.
00—fabricServer1.21.1mod
- FakePlayer keeps a single fake client connected on dedicated servers so hosts that check player count never see the server as empty.
- The fake user uses the name
ServerKeeper, an offline UUID tied to the mod id, and connects as soon as the server finishes starting; it is recreated automatically if ever removed. - The connection is stubbed (no real network traffic) and the player sits at the overworld spawn in spectator mode, invisible, silent, invulnerable, and flying to avoid interfering with gameplay.
- Works with Fabric loader/API for Minecraft 1.21.1 as a server-only mod; just drop the JAR in the server
modsfolder and start the server to keep it active. - Limitation: the fake player always counts as an online player; if you want different naming or conditional activation you would need to extend the logic.***