Features & Enhancements:
Bug Fixes & Improvements:
- Added support for 1.8, while still supporting 1.20. (Experimental)
- Added a new configuration option enableParticleTrail to control whether Ender Pearls should leave a particle trail when thrown.
- The particle type for the Ender Pearl trail can be customized using the particleType configuration option.
- Added a new configuration option waterSpeedMultiplier to control the speed multiplier of Ender Pearls when they hit water.
- The getColorizedString method in the EnderPearlListener class retrieves the appropriate language-specific message and applies color codes using the ChatColor.translateAlternateColorCodes method.
- Optimized and improved the entire EnderPearlListener class to enhance robustness and compatibility across different server versions.
- Added null checks for event parameters and their properties to prevent potential null pointer exceptions.
- Simplified version checks by using Bukkit.getBukkitVersion() and checking for specific version numbers.
- Optimized the isWater method to handle both old and new versions efficiently.
- Updated the getColorizedString method to provide a default message if the translation is missing.
- Optimized the onProjectileLaunch and onProjectileHit methods by adding early return statements for invalid or unsupported scenarios.
- Simplified the teleportation logic in the onProjectileHit method by directly teleporting the player to the landing location.
- Optimized the onEndermiteSpawn method to handle different server versions and improve performance.
- Fixed a potential issue where the plugin would fail to load the language file correctly if an error occurred during the loading process.
- Improved error handling in the createLangFile method of the ElixirWaterPearls class, logging a severe message if an error occurs while loading the language file.
- Removed redundant version checks in the EnderPearlListener class by introducing the isVersion1_9OrLater and isVersion1_13OrLater methods.
- Improved the getParticleTypeFromConfig method in the EnderPearlListener class to handle invalid particle types gracefully, falling back to a default value and logging a warning message.
- Enhanced the onProjectileLaunch method in the EnderPearlListener class to start a new BukkitRunnable for each Ender Pearl launched, allowing for more granular control over the particle trail and water speed modification.
- Improved the spawnParticle method in the EnderPearlListener class to handle version differences between Minecraft versions, using either the Particle or Effect class based on the server version.
- Removed unnecessary imports and variables.
Features & Enhancements:
Bug Fixes & Improvements:
- Added a new configuration option spawnEndermite to control the spawning of Endermites when Ender Pearls are thrown.
- By default, Endermites will spawn (spawnEndermite: true). Set to false to prevent Endermite spawning.
- Added a predictive algorithm to determine the likely landing spot of the Ender Pearl, ensuring safer teleportation for players. (Experimental)
- The predictLandingLocation method calculates the expected landing location based on the pearl's current position and velocity. (Experimental)
- Added a safety mechanism to find a secure location around the predicted landing spot of the Ender Pearl. (Experimental)
- The findSafeLocation method checks surrounding blocks to ensure the player is teleported to a safe spot, either in water or on land. (Experimental)
- Added an event handler onEndermiteSpawn to monitor and control Endermite spawning based on the spawnEndermite configuration.
- Endermites will not spawn if the configuration is set to false.
Features & Enhancements:
- Modified the handling of the enabledWorld configuration value to fall back to "world" if it's either missing or set to an empty string.
- Added a validation for the language configuration value against a list of supported languages. If the specified language is not in this list or if it's missing, the default value of "en" is used.
Bug Fixes & Improvements:
- Added a safety check for the enableParticleTrail boolean value. If it's missing or not a boolean, the default value of true is used.
- Adjusted the handling of the particleType configuration value. If the specified value is not a valid Particle enum or if it's missing, the default value of FIREWORKS_SPARK is used.
- Modified the handling of the waterSpeedMultiplier configuration value. If it's missing or not a double, the default value of 1.5 is used.
