A limited-lives survival mechanic for Minecraft 1.21.1, 26.2 and 26.3 servers, available as a Paper plugin and as a server-side Fabric mod.
Every player starts with three lives. Each death, from any cause, costs one life, and the player's name changes color to show how many are left: green with three, gold with two, red with one. Losing the last life bans the player for 24 hours of real time. When the ban ends, the player returns with a full set of lives.
Lives come back slowly. Ten hours of active online time restore one life, and the timer pauses while a player is AFK. Players can also give one of their lives to someone else, which costs the donor a life but speeds up the donor's own regeneration.
Red players are protected from being hunted: players with more lives cannot attack them unless the red player attacked first. Red players cannot fight each other. Admins can mark arenas where anyone can fight anyone and deaths cost no lives, or switch on a server-wide PvP event.
- Lives with colored names in chat and TAB (on Paper also above the player's head).
- A ban of
ban-hourshours (default 24) after losing the last life, with automatic restoration on the first login after the ban ends. - PvP protection for players on their last life, with a short retaliation window.
- Life gifting between players, with confirmation and timeout.
- Arenas: cuboid regions where all PvP is allowed and deaths cost no lives.
- A timed global PvP override for events.
- Regeneration based on online time, paused while the player is AFK.
- Banned players shown as gray
[DEAD]entries at the bottom of the TAB list. - Admin commands to pardon, reset or set lives.
- Messages in English, Russian, French, Italian and Spanish, each overridable with MiniMessage; reload without restart.
- SQLite storage, written off the main thread.
Outside arenas and outside a global PvP event:
| Attacker \ Victim | 3 lives (green) | 2 lives (gold) | 1 life (red) |
|---|---|---|---|
| 3 lives | yes | yes | only as retaliation |
| 2 lives | yes | yes | only as retaliation |
| 1 life | yes | yes | no |
- When a red player hits a green or gold player, that victim may hit the red player back for
retaliation-window-seconds(default 30). The window is per pair of players and is cleared when either of them dies or disconnects. - Inside an enabled arena, or while
/life event pvp-overrideis active, every player can hit every other player. - On Paper, damage from projectiles, primed TNT, area effect clouds and tamed pets counts as damage from the player who caused it. On Fabric, the player responsible for the damage source is used, for example the shooter of a projectile.
- Any death costs one life, except a death inside an enabled arena.
- A death during a global PvP event outside an arena still costs a life.
- Each death resets the regeneration timer.
- On the last remaining life the player gets a warning that the next death leads to a ban.
- A player with fewer than
max-liveslives gains one life afterregen-hours-per-lifehours online (default 10). - Time only counts while the player is online and not AFK. A player is AFK after
afk-minutesminutes (default 180) without moving. Setafk-minutesto-1to turn AFK detection off. - After a life is restored, the timer starts again from zero.
- Players at
max-livesdo not accumulate time. /lifeshows the current lives, time to the next life, the regeneration mode, the AFK state and the total lives spent on deaths.
- When the last life is lost, the player is kicked and banned for
ban-hourshours (default 24). - Connection attempts during the ban are refused with the remaining time.
- On the first login after the ban ends, the player gets
restored-lives-after-banlives (default 3) and an empty timer. /life pardon <player>ends the ban early. The pardoned player gets 1 life, not a full set. A player pardoned while offline is notified on the next login./life reset <player>clears any ban and restoresmax-liveslives.- The ban is kept by Life SMP itself, not in the server's ban list, so the vanilla
/pardoncommand does not affect it.
- The donor runs
/life gift <player>. The donor needs at least 2 lives, and the recipient must be online and belowmax-lives. - The recipient has
gift-request-timeout-secondsseconds (default 60) to run/life accept. A newer request to the same recipient replaces the older one. The request is cancelled if either player disconnects. - On acceptance the conditions are checked again, then the donor loses one life and the recipient gains one.
- The donor switches to accelerated regeneration: the next life takes
gift-regen-hours-per-lifehours (default 2.5) instead ofregen-hours-per-life. Progress already made is scaled proportionally to the new interval. The accelerated mode ends when the donor regains a life.
- Minecraft Java Edition server 1.21.1, 26.2 or 26.3.
- Java 21 for 1.21.1, Java 25 for 26.2 and 26.3.
- One of:
- Paper 1.21.1, 26.2 or 26.3, or a Paper fork such as Purpur (plugin jar, the same jar for all versions);
- Fabric Loader 0.16.0 or newer (1.21.1) or 0.18.4 or newer (26.2, 26.3) with Fabric API (mod jar, one per Minecraft version).
- Server side only. Players use an unmodified vanilla client.
Download the jar for your platform from Releases:
| Platform | File |
|---|---|
| Paper, Purpur (1.21.1, 26.2 and 26.3) | lifesmp-paper-<version>.jar |
| Fabric 1.21.1 | lifesmp-fabric-1.21.1-<version>.jar |
| Fabric 26.2 | lifesmp-fabric-26.2-<version>.jar |
| Fabric 26.3 | lifesmp-fabric-26.3-<version>.jar |
-
Stop the server.
-
Put
lifesmp-paper-<version>.jarinto theplugins/folder. -
Start the server.
-
Check the console for this line:
[LifeSMP] Life SMP Paper plugin enabled successfully. -
Edit
plugins/LifeSMP/config.ymlif needed and run/life reload.
-
Stop the server.
-
Make sure Fabric API for your Minecraft version is in the
mods/folder. -
Put the
lifesmp-fabric-<minecraft version>-<version>.jarthat matches your server into themods/folder. -
Start the server.
-
Check the log for this line:
Life SMP Fabric server adapter initialized successfully. -
Edit
config/lifesmp/config.jsonif needed and run/life reload.
On both platforms the log also shows Initialized SQLite database at <path> with the absolute path of the database file.
On Paper, admin commands require the lifesmp.admin permission (default: operators). On Fabric, they require operator permission level 4.
| Command | Description | Permission (Paper) | Default access |
|---|---|---|---|
/life |
Show your lives, time to the next life, regeneration mode, AFK state and lives spent | none | everyone |
/life help |
List available commands | none | everyone |
/life gift <player> |
Offer one of your lives to an online player | none | everyone |
/life accept |
Accept a pending life gift | none | everyone |
/life reload |
Reload the configuration without resetting player progress | lifesmp.admin |
operators |
/life set <player> <1-3> |
Set a player's lives | lifesmp.admin |
operators |
/life pardon <player> |
End a death ban early; the player gets 1 life | lifesmp.admin |
operators |
/life reset <player> |
Clear any ban and restore max-lives lives |
lifesmp.admin |
operators |
/life event pvp-override <true|false> [minutes] |
Turn the global PvP override on or off; minutes (1-1440) ends it automatically |
lifesmp.admin |
operators |
/life arena create <name> |
Create an arena around your position: 25 blocks in each horizontal direction, 10 below and 30 above | lifesmp.admin |
operators |
/life arena create <name> <x1> <y1> <z1> <x2> <y2> <z2> |
Create an arena from two corners in the current world | lifesmp.admin |
operators |
/life arena list |
List arenas | lifesmp.admin |
operators |
/life arena enable <name> |
Enable an arena | lifesmp.admin |
operators |
/life arena disable <name> |
Disable an arena | lifesmp.admin |
operators |
/life arena remove <name> |
Delete an arena | lifesmp.admin |
operators |
On Paper, /lives and /lsmp are aliases of /life. pardon, reset and set also accept names of offline players who have joined the server before.
| Platform | File |
|---|---|
| Paper | plugins/LifeSMP/config.yml |
| Fabric | config/lifesmp/config.json |
The file is created with default values on first start. Both files use the same keys. In config.json, dead-tab and colors are nested objects, as in YAML.
| Key | Default | Description |
|---|---|---|
language |
en |
Language of the built-in messages: en, ru, fr, it, es |
prefix |
<dark_gray>[<gradient:#55FF55:#FFAA00>Life</gradient>]</dark_gray> |
Text inserted for {prefix} in messages |
max-lives |
3 |
Maximum number of lives |
ban-hours |
24.0 |
Ban length in real hours after losing the last life |
restored-lives-after-ban |
3 |
Lives given on the first login after a ban ends |
regen-hours-per-life |
10.0 |
Online hours needed to regenerate one life |
gift-regen-hours-per-life |
2.5 |
Online hours per life for a donor after a gift |
afk-minutes |
180.0 |
Minutes without movement after which regeneration pauses; -1 turns AFK detection off |
retaliation-window-seconds |
30 |
How long a victim may hit back a red attacker |
gift-request-timeout-seconds |
60 |
How long a gift request stays valid |
autosave-minutes |
5.0 |
Interval for saving changed player data to the database (minimum 1 minute) |
dead-tab.enabled |
true |
Show banned players in the TAB list |
dead-tab.format |
<gray>☠ {player}</gray> <dark_gray>[DEAD]</dark_gray> |
MiniMessage format of a TAB entry; supports {player} and {time} |
dead-tab.color |
#AAAAAA |
Color of dead entries |
dead-tab.show-time |
false |
Refresh dead entries every 60 seconds so that {time} stays current |
dead-tab.max-entries |
50 |
Maximum number of dead entries shown |
dead-tab.sort-last |
true |
Place dead entries below all living players |
colors.3, colors.2, colors.1, colors.0 |
#55FF55, #FFAA00, #FF5555, #AAAAAA |
Name color for 3, 2, 1 and 0 lives |
messages.<key> |
empty | Overrides for single messages of the selected language |
Values below a safe minimum are raised to it: for example max-lives and restored-lives-after-ban are at least 1.
Run /life reload after editing the file. Regeneration progress is kept: when an interval changes, each player's progress is scaled to the new interval. The autosave task is rescheduled with the new interval.
All player-facing texts come from built-in language files. Set language to one of the values below and run /life reload:
| Value | Language |
|---|---|
en |
English (default) |
ru |
Russian |
fr |
French |
it |
Italian |
es |
Spanish |
To change a single text, add its key to the messages section. An entry there takes precedence over the selected language; every other key keeps the built-in text. The built-in texts and the full list of keys are in core/src/main/resources/lifesmp/lang/. Config files created by earlier builds may still contain a full messages section, which then overrides the language; delete that section to use language.
Paper (config.yml):
language: ru
messages:
gift.no-pending: "{prefix}<red>No gift is waiting for you.</red>"Fabric (config.json):
"language": "ru",
"messages": {
"gift.no-pending": "{prefix}<red>No gift is waiting for you.</red>"
}Messages use MiniMessage syntax. Message keys must not be renamed.
| Placeholder | Meaning |
|---|---|
{prefix} |
Value of prefix |
{player} |
Name of the other player |
{lives} |
Current number of lives |
{max} |
Value of max-lives |
{hearts} |
Heart symbols for the current lives |
{time} |
Duration (ban length, remaining time, regeneration interval, request timeout) |
{color} |
Color tag for the current number of lives |
{name}, {world}, {x1} ... {z2}, {status}, {count} |
Arena and event messages |
Message groups: pvp.*, death.*, regen.*, gift.*, info.* (output of /life), help.* (output of /life help), arena.*, event.*, admin.*, command.* (common command errors) and time.* (unit suffixes such as h and m).
All data is stored in a single SQLite database:
| Platform | File |
|---|---|
| Paper | plugins/LifeSMP/lifesmp.db |
| Fabric | config/lifesmp/lifesmp.db |
The database uses WAL mode, so lifesmp.db-wal and lifesmp.db-shm may exist next to it while the server runs. The schema is migrated automatically on startup.
To back up:
- Stop the server. Pending changes are written on shutdown.
- Copy
lifesmp.dbtogether with anylifesmp.db-walandlifesmp.db-shmfiles.
With the sqlite3 tool installed, a consistent copy can also be made while the server runs:
sqlite3 plugins/LifeSMP/lifesmp.db ".backup lifesmp-backup.db"The server fails with UnsupportedClassVersionError or refuses to load the mod.
Life SMP requires Java 21. Check with java -version that the server runs on Java 21.
NoClassDefFoundError or ClassNotFoundException on startup.
The jar does not match the platform. Use lifesmp-paper-<version>.jar in plugins/ on Paper and lifesmp-fabric-<version>.jar in mods/ on Fabric. On Fabric, also check that Fabric API is installed.
A banned player is not shown as DEAD in TAB.
Check that dead-tab.enabled is true and that the number of banned players does not exceed dead-tab.max-entries. The entry needs the player's name, which is stored on join; a player who has not joined since the name was recorded may be missing. Entries disappear when the ban ends.
How do I unban a player manually?
Run /life pardon <player> to unban with 1 life, or /life reset <player> to unban with full lives. Both work for offline players who have joined the server before. The vanilla /pardon command has no effect on Life SMP bans.
What happens when I update Life SMP?
Replace the jar and restart. The database schema is migrated automatically and existing data is kept. New config keys fall back to their defaults until you add them to the file. Back up lifesmp.db before updating.
- Only Minecraft 1.21.1, 26.2 and 26.3 are supported. Versions in between are not tested. Paper uses one jar for all of them; Fabric has one jar per Minecraft version (1.1.2 had no Fabric 26.2 jar, use 1.1.1 or 1.1.3 and newer there).
- Testing on Paper forks other than Paper itself has been limited.
- The Fabric mod must be installed on the server; installing it on a client has no effect.
- French, Italian and Spanish translations have not yet been reviewed by native speakers. Corrections are welcome.
/life setaccepts only values from 1 to 3, regardless ofmax-lives.- On Fabric,
/livesand/lsmpaliases are not registered.
The project follows a ports and adapters layout:
| Module | Contents |
|---|---|
:core |
Domain model, services, configuration model, SQLite storage. No dependency on Paper, Fabric or Minecraft. |
:paper |
Paper adapter: listeners, Brigadier commands, scheduler, scoreboard teams, TAB packets. |
:fabric |
Fabric adapter: Fabric API events, commands, scheduler, mixins, TAB packets. |
Core services: LifeEngine (join, death, quit and the one-second tick), AdminService (pardon, reset, set lives, name lookup), PvPPolicyEngine, RegenerationService, GiftService, ArenaService, DeadTabService in io.github.lifesmp.core.domain.service.
Port (io.github.lifesmp.core.ports) |
Implementations |
|---|---|
PlayerRepository |
SqlitePlayerRepository (core) |
ArenaRepository |
SqliteArenaRepository (core) |
NotificationService |
PaperNotificationService, FabricNotificationService |
PlatformScheduler |
PaperPlatformScheduler, FabricPlatformScheduler |
TabPresenter |
PaperTabPresenter, FabricTabPresenter |
EconomyIntegration |
EconomyIntegration.noop() |
Clock |
none yet |
Requires JDK 25 or newer to run Gradle (Fabric Loom 1.19 does not start on older JVMs). The sources are compiled with a JDK 21 toolchain (:core, :paper, :fabric, all for 1.21.1) and a JDK 25 toolchain (:fabric-26.2 and :fabric-26.3, for Minecraft 26.x). Gradle downloads a missing toolchain JDK on its own. The Paper jar and the 1.21.1 Fabric jar run on Java 21.
:fabric-26.2 and :fabric-26.3 build the Fabric sources of :fabric against Minecraft 26.2 and 26.3. Both use fabric-26/build.gradle.kts, which takes the Minecraft version from the project name; the list of versions is in settings.gradle.kts. The few Minecraft calls that differ between the versions are in McCompat, with one copy in fabric/src/mc1_21_1/java and one in fabric/src/mc26_2/java. The Paper jar is built against 1.21.1 only and also runs on 26.2 and 26.3.
./gradlew clean distOutput:
dist/paper/lifesmp-<version>.jardist/fabric/lifesmp-fabric-<version>.jar(Minecraft 1.21.1)dist/fabric-26.2/lifesmp-fabric-26.2-<version>.jar(Minecraft 26.2)dist/fabric-26.3/lifesmp-fabric-26.3-<version>.jar(Minecraft 26.3)
Run the tests and check the jar contents:
./gradlew test verifyJarsStart a Fabric development server (files go to fabric/run/):
./gradlew :fabric:runServerFor Paper, create a folder such as test-server/ (ignored by Git), place a Paper 1.21.1 or 26.2 server jar there, copy dist/paper/lifesmp-<version>.jar into test-server/plugins/ and start the server with Java 21 (1.21.1) or Java 25 (26.2).
| What | Where |
|---|---|
| Version | mod_version in gradle.properties |
| Group, Java toolchain | build.gradle.kts |
| Project name | settings.gradle.kts |
| Jar names | archiveBaseName in paper/build.gradle.kts, fabric/build.gradle.kts and fabric-26/build.gradle.kts; file names checked in verifyJars in build.gradle.kts |
| Java package | io.github.lifesmp in all modules; the HikariCP relocation target in paper/build.gradle.kts |
| Paper descriptor | paper/src/main/resources/paper-plugin.yml (name, main class, permission) |
| Fabric descriptor | fabric/src/main/resources/fabric.mod.json (mod id, entrypoint, dependencies) |
| Mixins | fabric/src/main/resources/lifesmp.mixins.json, refmap name in fabric/build.gradle.kts |
To change the Minecraft version, update the hard-coded versions in paper/build.gradle.kts (paperDevBundle, paper-api) and fabric/build.gradle.kts (minecraft, fabric-loader, fabric-api), the minecraft dependency in fabric.mod.json and api-version in paper-plugin.yml. The version properties in gradle.properties other than mod_version are currently not read by the build. Then re-verify:
- the mixin targets in
io.github.lifesmp.fabric.mixin, especially theentriesfield accessor ofClientboundPlayerInfoUpdatePacket; - TAB packet construction in
PaperTabPresenterandFabricTabPresenter; - Paper API calls (lifecycle command registration,
AsyncChatEvent, damage events) and Fabric API events; - the items in
CHECKLIST.md.
- Add the rule to
PvPPolicyEngine.evaluate, before the general cases if it should take precedence. - Add a factory method for the outcome to
PvPDecisionand, if needed, a value toDenialReason. - Add a message key if the attacker should be told why the hit was blocked.
- Cover it in
PvPPolicyEngineTest.
- Add the key to all five files in
core/src/main/resources/lifesmp/lang/.MessageBundleTestfails if a file is missing a key thaten.propertieshas. - Send it with
LifeConfig.formatMessage(key, placeholders); on Paper,PaperCommandRegistrar.renderfills{name}placeholders through MiniMessage resolvers. - Document new placeholders in this README.
To add a language, create <code>.properties with all keys of en.properties and add the code to MessageBundle.SUPPORTED_LANGUAGES and to the check in verifyJars.
Create a new module that depends on :core and implement NotificationService, PlatformScheduler and TabPresenter. Load the configuration into a LifeConfig, create DatabaseManager, run SqliteSchemaMigrator, then build the core services and LifeEngine the way LifeSmpPaperPlugin and LifeSmpFabricServer do. Forward joins, quits, damage, deaths and commands to LifeEngine and the services. Once per second call LifeEngine.tickOnlinePlayer for every online player with its position, then LifeEngine.tickServer; the position is what makes AFK detection work. Run any callback that touches game objects on the server thread, because profile loading completes on the database thread.
- No database IO on the server main thread. Repositories return
CompletableFutureand run on the database executor; the main thread works withLifeProfileCache. A profile is loaded when the player joins and removed from memory after the save on quit. - Changes to several fields that must be stored together (a death and its ban, a gift) happen inside
synchronized (profile), andLifeProfile.snapshot()takes the same lock. - Schema changes are new migrations in
SqliteSchemaMigratorwith an incrementedCURRENT_VERSION. Existing migrations are never changed. - Player-facing texts live in the language files under
core/src/main/resources/lifesmp/lang/; themessagessection of the configuration only overrides them. Log messages and code comments are in English. - Every source file starts with the SPDX header. See CONTRIBUTING.md for commit style and pull request rules.
Life SMP is licensed under the GNU General Public License v3.0 or later (GPL-3.0-or-later). See LICENSE.
For forks this means: if you distribute a modified version or a work based on it, you must release it under GPL-3.0-or-later as well, make the corresponding source code available, and keep the existing copyright and license notices. Third-party components and their licenses are listed in NOTICE.md. Contributions are accepted under the same license, see CONTRIBUTING.md.
This section is a summary, not legal advice.