
Lifesteal Plugin
A fully customizable, production-grade Minecraft plugin that implements a complete lifesteal system with hearts, bans, revives, MySQL support, advanced crafting recipes, and full admin control — designed for scalable SMP servers.
10.2K
13
Список изменений
1. BanManager Improvements
| 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) |
%lifesteal_maxhealth% | Shows the maximum health (HP) of the player (as an integer) |
%lifesteal_hearts_left% | Displays how many hearts the player can still gain before reaching max |
%lifesteal_online_count% | Shows the number of currently online players |
%lifesteal_database_connected% | Displays "true" or "false" depending on whether the database is connected |
Файлы
lifesteal-smp-1.4.0.jar(308.21 KiB)
ОсновнойМетаданные
Канал релиза
Release
Номер версии
1.4.0
Загрузчики
BukkitPaperPurpurSpigot
Версии игры
1.21–1.21.8
Загрузок
9.4K
Дата публикации
8 мес. назад
