WaterBar999 1.0.3
on Sep 2, 2025Features Added dynamic water depletion system with biome-based loss rates (hot, cold, default biomes). Implemented dirty and clean water items with distinct effects and lore. Added water collection mechanic from water and waterlogged blocks with 80% chance dirty water, 20% clean water. Introduced water purification via campfire smelting with custom CampfireRecipe. Added crafting recipe for dirty water (glass bottle + dirt). Implemented custom furnace purification handling via FurnaceSmeltEvent to convert dirty water to clean water. Water level displayed on player XP bar for smooth visual feedback. Configurable water restore amounts for dirty and clean water. Configurable potion effects: poison from dirty water, slowness when water is low. Dehydration damage task that damages player periodically when water reaches zero. Configurable dehydration damage amount and interval. Async player data saving to prevent server lag. Robust event handling for player join, respawn, interact, item consume, and furnace events. Permission-based commands for checking water level and giving water items. Action bar notifications for low water and dehydration status. Prevents item duplication and unintended behavior with careful inventory management. Bug Fixes Fixed waterlogged block detection by properly checking Waterlogged interface and waterlogged state. Removed use of FurnaceRecipe with custom ItemStack metadata; replaced with event-based furnace smelting handling. Fixed player data saving race conditions by loading player data once and saving asynchronously. Fixed dehydration task lingering after player death or respawn by cancelling tasks on respawn. Fixed glass bottle removal to remove exactly one bottle instead of all stacks. Reduced action bar spam by removing redundant messages and consolidating notifications. Fixed biome water loss truncation by using double precision for water levels and loss rates. Clarified config units (ticks) for potion effect durations. Prevented water farming exploits by restricting water collection to valid water or waterlogged blocks only. Improved random chance for water collection to 80% dirty, 20% clean for realism.
WaterBar999 V1.0.2
on Aug 8, 2025Configuration Changes Added Configuration Options: Introduced a new configuration structure in config.yml for water system settings: water-levels: max-water: Maximum water level (default: 100) starting-water: Starting water level for players (default: 100) warning-threshold: Water level threshold for warnings (default: 20) dirty-water-restore: Water restored from drinking dirty water (default: 5) clean-water-restore: Water restored from drinking clean water (default: 20) water-loss: hot-loss: Water loss rate in hot biomes (default: 0.66) cold-loss: Water loss rate in cold biomes (default: 0.16) default-loss: Default water loss rate (default: 0.33) hot-biomes: List of hot biomes (e.g., "DESERT", "SAVANNA", "BADLANDS") cold-biomes: List of cold biomes (e.g., "SNOWY_PLAINS", "ICE_SPIKES", "FROZEN_OCEAN") effects: dirty-water: poison-duration: Duration of poison effect from dirty water (default: 100) poison-strength: Strength of poison effect from dirty water (default: 0) Code Changes Biome Loss Rate Loading:
Added loadBiomeLossRates() method to load biome-specific water loss rates from the configuration. Player Data Management:
Added loadPlayerData(UUID uuid) method to load player data from player.yml. Implemented automatic creation of player data entries if they do not exist, initializing water levels to the starting value from the configuration. Introduced getPlayerConfig() and savePlayerConfig(FileConfiguration playerConfig) methods to handle player data storage in player.yml. Water Level Updates:
Updated the logic in onPlayerDrink(PlayerItemConsumeEvent event) to use configurable values for restoring water levels when consuming dirty or clean water. Dynamic Water Loss:
Updated the updatePlayerThirst(Player player) method to use the loaded biome loss rates, including a default loss rate for unspecified biomes. Removed Hardcoded Values:
Replaced hardcoded values for maximum water, starting water, and restoration amounts with values loaded from the configuration. Updated Player Join Logic:
Modified onPlayerJoin(PlayerJoinEvent event) to load player data upon joining, ensuring that player water levels are initialized correctly. Removed Unused Code:
Removed any code that was not necessary for the new configuration and functionality.
WaterBar 1.1
on Jul 22, 2025fixed the where the plugin would spam chat if you were in creative with useless messages exp bar now actively shows how much water you have left along with still showing your exp level when you click with a water bottle it now uses up 2 of them and 1 becomes a normal water bottle for brewing and the other becomes a dirty or clean water bottle
WaterBar 1.0
on Jul 10, 2025the first release