Tags
Creators
Details
Licensed ARR
Published last year
Updated 3 months ago
All versions
1.2.0
Release
Lifesteal Plugin 1.2.0last year 246
Compatibility
Minecraft: Java Edition
1.21–1.21.7
Platforms
Bukkit
Paper
Purpur
Spigot
Changes
SQL ENHANCEMENTS!!
| 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). |
Prevents memory leaks and ensures that resources are freed correctly when the plugin is disabled. | Ensures the plugin shuts down cleanly and frees resources (e.g., database connections). |
| Logging Improvements | Console messages now use Minecraft’s color formatting (& to §). |
Improves readability and visibility of logs for administrators. | More visually appealing and easier-to-read logs for server admins. |
| SQL Enhancements | Enhanced database interactions with prepared statements and better error handling. | Prevents SQL injection and improves the security and reliability of database operations. | More secure and stable SQL interactions. |
| SQL Connection Management | Validates connection state before performing SQL operations. | Ensures the plugin doesn't attempt to execute queries on invalid or closed connections. | Prevents errors or unexpected behavior due to closed/stale database connections. |
| SQL Query Improvements | Returns default fallback values if SQL queries fail or no data is found. | Ensures the plugin continues working smoothly even if database interactions encounter issues or missing data. | The plugin continues functioning even when database errors or missing data occur. |
| SQL Resource Management | Properly closes database resources (PreparedStatement, ResultSet) using try-with-resources. |
Ensures resources are properly released, preventing memory leaks and improving performance. | More efficient and cleaner database code. |
| Plugin Disable Enhancements | Ensured safe shutdown of resources (database connections, recipes, etc.). | Prevents lingering resources, file locks, or incomplete cleanup during the plugin's shutdown. | A stable and reliable server experience with clean shutdown behavior. |
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle. To learn more about the Modrinth Maven API, click here.
Note: When available, you should use the creator's maven repo instead as it will have transitive dependency information that the Modrinth Maven API does not. You may also end up with duplicate dependencies if you use a mix of Modrinth and non-Modrinth Maven repositories for your dependencies, because the group identifier will be different when served through the Modrinth Maven API.
Maven coordinates:
Version ID:
build.gradle:
repositories {
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
// forRepositories(fg.repository) // Uncomment when using ForgeGradle
filter {
includeGroup "maven.modrinth"
}
}
}
// Standard Gradle dependency
dependencies {
implementation "maven.modrinth:pZ4D6mrk:U4iIdj16"
}
// Legacy Loom dependency
dependencies {
modImplementation "maven.modrinth:pZ4D6mrk:U4iIdj16"
}

