▶️ ЗАБЕРИ СВОИ 8 ПОДАРКОВ 🎁 ПРИ СОЗДАНИИ СВОЕГО МАЙНКРАФТ СЕРВЕРА
Моды/Lifesteal Plugin
Lifesteal Plugin

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.3K
13
Все версииLifesteal Plugin 1.1.0

Lifesteal Plugin 1.1.0

Release9 мес. назад

Список изменений

🧠 Architecture & Design

  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(...).

Файлы

lifesteal-smp-1.0.0.jar(280.23 KiB)
Основной
Скачать

Метаданные

Канал релиза

Release

Номер версии

1.1.0

Загрузчики

Bukkit
Paper
Purpur
Spigot

Версии игры

1.21–1.21.6

Загрузок

123

Дата публикации

9 мес. назад

Загрузил

ID версии

Главная