
LifestealSMP 🔪❤️
LifestealSMP is a highly configurable and fully featured Lifesteal plugin designed for modern Minecraft SMP servers.
It offers a complete hearts-based survival system, revive mechanics, advanced crafting, multi-language support, and full administrative control.
🔧 Core Features
- ✅ Heart System: Fully configurable heart loss and gain based on deaths, PvP, or environment.
- ✅ Heart Items: Withdraw hearts into physical items that can be traded or consumed.
- ✅ Heart Tiers: 5 tiers of heart items allow restoring from +1 up to +5 hearts.
- ✅ Custom Crafting Recipes: Create your own crafting recipes for heart items and revive beacon.
- ✅ Revive System: Revive banned players using special Revive Beacons via a chat-based confirmation system.
- ✅ Rare Revive Beacon Recipe: Uses expensive materials like Netherite Blocks, Nether Stars, Wither Skulls, Enchanted Golden Apples & Totems.
- ✅ Ban System: Players get automatically banned upon reaching 0 hearts.
- ✅ Admin Control: Powerful
/lifestealadminsystem with full server control. - ✅ Command Hiding: Commands are hidden dynamically for players without permission.
- ✅ Database Support: MySQL and SQLite database options for scalable player data.
- ✅ Multi-Language Support: Fully translatable through external language files.
- ✅ Configuration Reloading: Reload configuration and language files live using
/reloadlifesteal. - ✅ Safe Bukkit API Design: Compatible with Bukkit, Spigot, Paper & Purpur.
- ✅ Recipe viewer: Players can explore available recipes through an interactive inventory GUI.
- ✅ Revenge system: The Revenge Thread system gives defeated players an opportunity to retaliate.
- ✅ Anti-farming protection system: Prevent players from repeatedly farming one another for hearts.
🎯 Commands
Main Commands:
| Command | Description | Permission |
|---|---|---|
/withdrawheart |
Withdraw one heart into a physical item | lifesteal.withdraw |
/withdrawheart <amount> |
Withdraw multiple hearts in one command | lifesteal.withdraw |
/recipeview |
Open the recipe overview | lifesteal.recipeview |
/recipeview heart |
Browse heart crafting recipes | lifesteal.recipeview |
/recipeview heart <tier> |
View a specific heart-tier recipe | lifesteal.recipeview |
/recipeview beacon |
View the Revive Beacon recipe | lifesteal.recipeview |
/recipeview all |
Open the complete recipe overview | lifesteal.recipeview |
/reloadlifesteal |
Reload plugin configuration and language data | lifesteal.reload |
Admin Subcommands (/lifestealadmin)
| Subcommand | Description |
|---|---|
set <player> <amount> |
Set hearts |
add <player> <amount> |
Add hearts |
remove <player> <amount> |
Remove hearts |
giveheart <player> [tier] [amount] |
Give heart items (Tier 1-5) |
revivebeacon <player> |
Give Revive Beacon |
unban <player> |
Unban player |
purgebans |
Unban everyone |
setmax <amount> |
Set maximum hearts |
resetall |
Reset hearts for all players |
banlist |
List all banned players |
reload |
Reload config & language |
🎯 Permissions
| Permission | Description | Default |
|---|---|---|
lifesteal.admin |
Grants access to Lifesteal administrative commands | OP |
lifesteal.reload |
Allows plugin configuration and language reloads | OP |
lifesteal.withdraw |
Allows players to withdraw hearts into items | true |
lifesteal.revive |
Allows players to activate Revive Beacons | true |
lifesteal.recipeview |
Allows access to the recipe viewer | true |
lifesteal.bypasslimit |
Bypasses selected gameplay-limit checks without violating the hard heart-storage cap | OP |
🔁 PlaceholderAPI Support
LifestealSMP includes built-in PlaceholderAPI expansion for dynamic integration with scoreboards, tab lists, nametags, holograms, and other placeholder-compatible systems. You can display player-specific data across your server in real-time.
| Placeholder | Description |
|---|---|
%lifesteal_hearts% |
Shows the player’s current heart count. Returns an empty value when the player’s heart data is unavailable. |
%lifesteal_hearts_left% |
Shows how many additional hearts the player can gain before reaching the configured maximum. |
%lifesteal_max_hearts% |
Returns the configured maximum heart count. |
%lifesteal_starting_hearts% |
Returns the configured starting heart count for new players. |
%lifesteal_online_count% |
Displays the current number of online players. |
%lifesteal_database_connected% |
Returns "true" or "false" depending on whether the configured database backend is connected. |
%lifesteal_database_type% |
Displays the active database backend, such as "mysql" or "sqlite". |
%lifesteal_language% |
Displays the currently active language code, such as "en", "de", or "es". |
%lifesteal_prefix% |
Inserts the plugin’s configured and color-formatted message prefix. |
%lifesteal_online% |
Returns "true" or "false" depending on whether the requested player is currently online. |
%lifesteal_banned% |
Returns "true" or "false" depending on whether the player is Lifesteal-banned. |
%lifesteal_ban_reason% |
Displays the player’s Lifesteal ban reason when available. |
%lifesteal_revenge_active% |
Returns "yes" or "no" depending on whether the player currently has an active Revenge Thread. |
%lifesteal_revenge_target% |
Displays the username of the player’s current Revenge Thread target. Returns an empty value when no target exists. |
%lifesteal_revenge_time_left% |
Displays the remaining Revenge Thread duration in a readable format, such as "2m 14s". |
%lifesteal_revenge_time_left_seconds% |
Returns the remaining Revenge Thread duration as a whole number of seconds. |
%lifesteal_revenge_progress% |
Returns the Revenge Thread progress as a percentage from 0 to 100. |
These placeholders allow server owners and developers to deeply customize their user experience, creating rich, dynamic interfaces that reflect each player's lifesteal status in real-time.
🚀 Supported Platforms

- ✅ Bukkit 26.2+
- ✅ Spigot 26.2+
- ✅ Paper 26.2+
- ✅ Purpur 26.2+
- ✅ MySQL & SQLite Databases
🔒 No NMS - No Version Lock
- 100% version-independent.
- No use of NMS, reflections, or unsafe internal APIs.
- Fully safe for future Minecraft versions.
⚙ Planned Expansions
- ✅ Economy integration
- ✅ Custom revive options
- ✅ More heart tier recipes
- ✅ Crafting recipe GUI configuration
- ✅ Expanded admin control panels
🔥 Perfect For:
- ✅ Survival servers
- ✅ Hardcore SMP
- ✅ Lifesteal communities
- ✅ Private or public SMP servers
- ✅ Large network environments
LifestealSMP delivers a full Lifesteal SMP experience while remaining fully scalable, safe, and professional for any Minecraft server.
Made with ❤️ by MidnightZone

How to Install Lifesteal Plugin (Plugin)
Lifesteal Plugin by MidnightZone is verified for Bukkit, Paper, Purpur, Spigot across Minecraft versions 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21 (latest release: 1.9.0, file size: 565 KB). Follow the steps below to install it safely from ModCraft.tv:
- Click the Download button above and select your Minecraft version (1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21) and platform (Bukkit, Paper, Purpur, Spigot).
- Make sure you have the compatible loader or environment installed for Bukkit, Paper, Purpur, Spigot.
- Move the downloaded Lifesteal Plugin file into your Minecraft
.minecraft/pluginsfolder and launch the game.
All Versions
+ Add Version- The crafting system now supports the complete heart progression:**
| Heart tier | Recipe support | Custom ingredient support |
| ---------- | -------------: | ------------------------: |
| Tier 1 | Existing | Yes |
| Tier 2 | Added | Yes |
| Tier 3 | Added | Yes |
| Tier 4 | Added | Yes |
| Tier 5 | Added | Yes |
## **Recipe Viewer Improvements**
| Change | Description |
| ------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Recipe viewer now matches
config.yml** | The recipe viewer now reads from the same compiled recipe definitions used by the crafting system. It no longer reconstructs recipes separately from raw materials, eliminating differences between what players see and what Bukkit actually accepts. || **Correct custom heart icons** | Tiered heart ingredients are displayed using cloned custom
ItemStack objects containing the correct name, lore, material, persistent item type, and heart-tier value. The viewer no longer displays every heart ingredient as a generic Nether Star or base material. || **Accurate recipe shapes** | Every configured row and ingredient symbol is mapped to the correct slot in the 3×3 recipe preview. Empty characters remain empty, duplicate symbols reuse the correct item, and malformed shapes are rejected before the menu is shown. |
| **Accurate result previews** | Preview result slots now use the exact item generated by
RecipeManager, including configured material, tier value, display name, lore, amount, item flags, and persistent metadata. || **Live reload refresh** | Running
/reloadlifesteal or /lifestealadmin reload now rebuilds all currently open recipe-view inventories. Players do not need to close and reopen the menu to see updated shapes, ingredients, results, names, lore, enabled states, or language text. || **Menu state preservation** | During a reload, the viewer preserves the player’s current location in the recipe interface. A player viewing Tier 4 remains on the refreshed Tier 4 preview rather than being forced back to the ov
...
| --------------------------- | ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Revenge Thread** | **New revenge system added** | Added a full revenge-thread mechanic that binds a victim to the player who killed them for a configurable amount of time. |
| **Revenge Thread** | **Structured revenge state model** | Added a dedicated revenge thread object with validated victim ownership, killer ownership, start time, expiry time, and lifecycle helpers. |
| **Revenge Thread** | **Configurable revenge duration** | Added configurable revenge duration using
revenge-thread.duration-seconds. || **Revenge Thread** | **Configurable revenge bonus damage** | Added a revenge-only damage multiplier against the killer using
revenge-thread.damage-multiplier. || **Revenge Thread** | **Directional revenge tracking** | Added direction tracking toward the killer through action bar and optional compass behavior. |
| **Revenge Thread** | **Compass guidance** | Added optional compass tracking toward the revenge target. |
| **Revenge Thread** | **Action bar direction hints** | Added direction hints through
%direction%-based action bar messaging. || **Revenge Thread** | **Localized direction labels** | Added configurable direction strings like north, south, north-east, nearby, and more. |
| **Revenge Thread** | **Close-range reveal** | Added a configurable reveal mechanic that briefly highlights the revenge target when nearby. |
| **Revenge Thread** | **Trap resistance** | Added configurable revenge trap resistance so victims take reduced trap-like damage from the player tied to the thread. |
| **Revenge Thread** | **Block trap toggle** | Added
block-damage-enabled support to explicitly control whether generic environmental block damage participates in revenge resistance. ...
| Change | Description |
| ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Recipe preview system | Added a full in-game recipe preview system for the plugin’s custom items. Players no longer need to rely on chat messages, screenshots, or outside documentation to understand how to craft important items. The feature introduces a dedicated GUI-based workflow for browsing and previewing custom recipes directly inside Minecraft. |
|
/recipeview command | Added a new /recipeview command as the entry point for the recipe preview system. It supports targeted previewing as well as overview browsing, making the feature usable both for players who already know what they want to inspect and for players who are just exploring available custom recipes. || Heart recipe preview | Added a dedicated Heart recipe preview menu. This screen visually displays the configured 3×3 recipe layout, the crafted result, and supporting GUI information so players can immediately understand how the Heart item is made without needing external help. |
| Revive Beacon recipe preview | Added a dedicated Revive Beacon recipe preview menu. Just like the Heart preview, it presents the full crafting layout and output item in a clean GUI, making one of the plugin’s most important late-game items much easier to understand and communicate to players. |
| Recipe overview menu | Added an overview GUI accessible through
/recipeview all. This acts as a recipe browser where players can see the available custom recipe categories in one place and open the exact recipe they want from there. It improves discoverability and makes the feature feel like a proper in-game interface instead of a command-only utility. || GUI navigation flow | Added menu navigation between overview and detailed recipe previews, including a dedicated back button in recipe screens. Players can now move through the recipe system naturally instead of reopening commands every time they want to inspect another item. |
| Localized recipe G
...
### **Important Notice**
| Change | Description |
| ---------------------------------------- | --------------------------------------------------------------------------------------------------------- |
| PlaceholderAPI incompatibility on 26.2 | This plugin version is currently not compatible with PlaceholderAPI when running on **Minecraft 26.2 (server)**. |
### **Changelog/Improvements**
| New features | Description |
| ----------------------------- | ----------------------------------------------------------------------------------------------------------------- |
| Heart Refund system | Deaths from non-player causes can now be handled more fairly, depending on server settings. (configurable) |
| Player-only heart loss option | Servers can now make heart loss happen only when a player is killed by another player. (configurable) |
| Anti-Farm protection | Repeatedly killing the same player in a short time no longer lets players farm hearts unfairly. (configurable) |
| Indirect kill support | Indirect player-caused deaths are now handled more accurately, making heart rewards feel fairer. (configurable) |
| API support added | LifestealSMP now includes API support, allowing better compatibility with supported addons and external features. |
- Small notice: All of the new features (except for API) can be enabled/disabled in the config.yml based on user's preferences**
| Change | Description |
| ------------------------------ | ------------------------------------------------------------------------------------------------------- |
| Fairer death handling | Non-combat and environmental deaths now behave more consistently. |
| Better PvP heart transfers | Heart gain and heart loss during PvP is now more reliable and predictable. |
| Cleaner indirect kill rewards | Players can now be rewarded more properly for certain indirect kills. |
| Anti-farm cooldown enforcement | Repeated killer → victim kills inside the cooldown no longer transfer hearts. |
| Lifesteal ban checks improved | Compatible systems can now detect whether a player is banned through the Lifesteal system more cleanly. |
| Change | Description |
| --------------------------- | ----------------------------------------
...
| ------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
| **Removed noisy normal-case logging** | Stopped treating “no player row found” as an
INFO event, because this is normal for first join / first lookup. || **Debug-only missing-record logs** | Kept optional visibility by moving the message behind
debug: true instead of always spamming console. || **Cleaner DB reads** |
MySQL#getHearts() and SQLite#getHearts() now return starting-hearts quietly when no record exists. || **Reduced console clutter** | Makes real errors easier to notice because harmless first-time lookups no longer flood logs. |
| **Safer connection checks** | Added
isConnectionOpen() style checks before queries so bad connection states are logged clearly and separately. || Change | Description |
| -------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Custom-beacon-only detection** | The revive listener no longer treats any plain beacon as a revive beacon; it checks the custom beacon metadata. |
| **Right-click + place support** | The beacon now works seamlessly whether the player right-clicks it or tries to place it. Placement is cancelled and revive mode starts instead. |
| **Config-synced beacon metadata** |
/lifestealadmin revivebeacon now builds the beacon from revive-beacon-crafting.display-name and revive-beacon-crafting.lore, matching listener checks exactly. || **Session timeout handling** | Revive sessions now expire cleanly after the timeout instead of lingering awkwardly. |
| **Duplicate-session prevention** | A player cannot start multiple revive sessions at once. |
| **Safer target lookup** | Revive chat logic now resolves the target more carefully and handles invalid names more safely. |
| **Guaranteed beacon consumption on success** | After a successful revive, the beacon is consumed correctly from the reviver’s main hand.
...
| Change | Description |
| ----------------------------- | -------------------------------------------------------------- |
| **Fail-safe banning** | Checks player validity (online state, name) before banning. |
| **Customizable ban reasons** | Prepares ban messages with clear reasons and placeholders. |
| **Safer unbanning** | Prevents unban attempts for null/invalid players. |
| **Consolidated log messages** | Unified logging with better error context. |
| **Future-proofing** | Added potential for temporary bans (Date parameter left open). |
## 2. HeartManager Improvements
| Change | Description |
| ----------------------------- | -------------------------------------------------------------------- |
| **Centralized validation** | Sanitizes heart values (no negatives, max cap) via
sanitize(). || **Safe scheduling** | Delays health update with
Bukkit.runTask() only when necessary. || **Single DB access per call** | Avoids redundant DB calls by reusing
PlayerData. || **Flexible heart updates** |
addHearts() and removeHearts() now ensure health sync post-save. || **Improved max health logic** | Always guarantees at least 1 heart (
2.0 health). || **Better null handling** | All methods safely return/exit when player or UUID is null. |
## 3. RecipeManager Improvements
| Change | Description |
| ---------------------------- | ----------------------------------------------- |
| **Recipe validation** | Verifies shape (3x3 max), logs invalid formats. |
| **Dynamic tiers** | Supports
tier setting for Heart recipe. || **Configurable outputs** | Item name and lore now pulled from config. |
| **Safe removal** | Wraps
Bukkit.removeRecipe() with checks. || **Centralized registration** |
registerAllRecipes() introduced. || **Detailed error logs** | Detects missing/invalid materials per symbol. |
| **Extensible design** | Ready for additional custom recipes. |
## Added new placeholders!
| Placeholder | Description |
| -------------------------------- | ----------------------------------------------------------------------------- |
|
%lifesteal_playername% | Returns the **player’s name**, or offline name if player is not online ||
%lifesteal_uuid% | Returns the **UUID** of the player ||
%lifesteal_health% | Shows the **current health (HP)** of the player (as an integer) || `%l
...
| Dimension | Description | Status |
| ------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------- |
| **1. Resilience Architecture** | Commands and placeholder systems are built to **continue functioning even under partial system failure** (e.g., config loss, null plugin fields, SQL failure, PAPI missing). This is **resilience by design**, not exception handling afterthought. | ✅ |
| **2. Graceful Degradation** | Instead of crashing or halting features when a dependency is missing (like PlaceholderAPI or MySQL), your system **downgrades functionality** while maintaining UX continuity (
"Offline", "ERR", fallback materials, default config values). | ✅ || **3. Dynamic Reflection Proxy for Optional API** |
PlaceholderRegistrar uses dynamic reflection and proxying to register placeholders **without compile-time binding to PAPI**, supporting modular deployment and late binding. This is a **decoupling architecture pattern**. | ✅ || **4. Semantic Placeholder Decoding Layer** | The use of
switch(identifier.toLowerCase()) with contextual logic (like online checks, config fallbacks) builds a **semantic parser for identifiers**. This design allows for scalable growth (e.g., %lifesteal_kills_today%, %lifesteal_revive_tokens%). | ✅ || **5. Config-Driven Control Layer** | All messages, materials, database types, and display elements are **externalized to config**, making the plugin highly **customizable without code changes** — a hallmark of production-tier design. | ✅ |
| **6. Contextual Tab Completion DSL** |
AdminTabCompleter is essentially a **domain-specific suggestion language** for command trees. It parses arg index, subcommand semantics, and sender context to give tailored completions. | ✅ || **7. Game Rule-Aware Behavior** | Commands like
/withdraw **respect game logic constra...
| **Category** | **Improvement** | **Reason** | **Result** |
| -------------------------------- | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
| **Thread Safety & Singleton** |
instance field is marked as volatile for thread safety. | Ensures safe access to the plugin’s singleton instance across multiple threads. | Prevents concurrent thread issues with inconsistent or conflicting access to the plugin instance. || **Modularization & Readability** | Refactored
onEnable() and onDisable() into smaller methods (init(), registerListeners(), etc.) | Makes the code more modular, readable, and maintainable. | Easier to manage and extend the plugin with minimal impact on the core plugin lifecycle. || **Error Handling & Logging** | Enhanced error logging with detailed logs in critical areas. | Provides clearer debugging information when issues arise. | Better visibility in logs for identifying and troubleshooting issues. |
| **Command Registration** | Commands now have permissions and tab completions (
setTabCompleter(), setPermission()). | Enhances command functionality and security. | Commands are more user-friendly (with tab completions) and secure (with permissions). || **Null Checks & Validation** | Added null checks for commands, listeners, and database connections. | Prevents
NullPointerException and ensures proper initialization before use. | More robust and reliable behavior, with appropriate fallbacks or warnings. || **Separation of Concerns** | Separated command and listener registration into individual methods. | Improves maintainability by breaking down responsibilities into smaller, manageable chunks. | Clearer organization and modularity in the code. |
| **Resource Management** | Proper resource cleanup during plugin shutdown (
safelyShutdown() method). ...
1. Centralized Utility APIs – MessageUtils, ColorUtils, ItemBuilder provide DRY, reusable patterns.
2. Singleton-safe plugin access – consistent use of getInstance() for global plugin reference.
3. Separation of concerns – clearly segmented managers (HeartManager, BanManager, etc.) avoid bloated main class.
4. Graceful failover & shutdown – plugin disables on fatal error; database and recipes properly closed.
5. Dynamic command delegation – uses executor-permission binding; fallback warnings for missing entries.
## ⚙️ Code Quality & Safety
1. Null safety added – guards against null messages, lists, strings, ItemMeta, etc.
2. Cloning of mutable objects – avoids returning internal ItemStack references directly.
3. Input validation – amount clamped (1–64), tier limited (1–5), keys checked.
4. Regex matching via Matcher.appendReplacement() – safe and efficient HEX color parsing.
5. Safe config fallback – missing lang keys gracefully return default with warning.
## 📈 Performance Improvements
1. Efficient string coloring – reused helper for batch lore coloring reduces overhead.
2. Deferred meta setting – avoids redundant operations on ItemMeta.
3. Command tab completer registered conditionally – avoids NPE if command is missing.
## 📜 Documentation & Readability
1. Full JavaDocs added – method-level docs explain parameters, return values, and side effects.
2. Consistent naming and formatting – fluent, descriptive method and variable names.
3. Simplified logging interface – log(String) method wraps colored console output.
## 🚨 Error Handling & Logging
1. Fallback logs for lang keys – warns when translation keys are missing.
2. Structured exception logging – prints full stack trace on startup failure.
3. Invalid hex codes skipped silently – prevents plugin crash from user config errors.
## 🧩 Extensibility Support
1. Lore overloads and builder extensibility – builder pattern allows for chaining, expansion (e.g., enchantments).
2. Formatted string retrieval in LangManager – supports runtime placeholders with String.format(...).

