Compatibility
Minecraft: Java Edition
Platforms
Creators
Details
WaterBarPlugin is a comprehensive Minecraft survival plugin that introduces a realistic thirst mechanic to enhance gameplay immersion. Players must manage their water levels by collecting, purifying, and consuming water to survive. The plugin features dynamic biome-based water depletion, custom water items, purification systems, and configurable effects, making survival more challenging and engaging.
Features Dynamic Thirst System: Players have a water level that depletes over time based on the biome they are in. Hot biomes cause faster water loss, cold biomes slower, and default biomes moderate loss.
Custom Water Items:
Dirty Water: Can be collected from natural water sources with an 80% chance. Causes poison when consumed but restores a small amount of water. Clean Water: Can be obtained by purifying dirty water. Safe to drink and restores a larger amount of water. Water Collection: Players can collect water by right-clicking water or waterlogged blocks with a glass bottle. The plugin ensures realistic chances for dirty vs. clean water.
Water Purification:
Campfire Purification: Dirty water can be purified using a campfire with a custom campfire recipe. Furnace Purification: Dirty water can be purified in a furnace. The plugin listens to furnace smelting events to convert dirty water to clean water. Crafting Recipe: Players can craft dirty water by combining a glass bottle and dirt.
Thirst Effects:
Drinking dirty water applies poison effects. Low water levels apply slowness to simulate dehydration. When water reaches zero, players take periodic damage until they drink water. Visual Feedback: Water level is displayed on the player’s XP bar for a smooth and intuitive indicator.
Configurable: All key parameters such as water loss rates, restore amounts, potion effect durations, and damage settings are configurable via config.yml.
Robust Event Handling: Handles player join, respawn, interaction, item consumption, and furnace events to maintain consistent and bug-free gameplay.
Async Player Data Management: Player water levels are saved asynchronously to prevent server lag and data loss.
Permission-Based Commands: Provides commands for players and admins to check water levels and give water items.
Permissions thirstbar.use Allows players to use the /water command and experience the thirst mechanics. Default: true
thirstbar.admin Allows players to use admin commands such as giving clean or dirty water items. Default: op Commands /water check Displays the player’s current water level (0-100).
/water give <clean|dirty> Gives the player a clean or dirty water bottle. Requires thirstbar.admin permission.
/water help Shows help information about water commands.
Core Systems
-
Water Level Management Tracks each player’s water level as a double value (0 to 100). Water depletes periodically based on biome-specific loss rates. Water levels are saved and loaded from a persistent YAML file asynchronously.
-
Water Collection & Items Players collect water by right-clicking water or waterlogged blocks with glass bottles. The plugin differentiates dirty and clean water using persistent data keys on custom potion items.
-
Water Purification Purification is handled via campfire recipes and furnace smelting events. Dirty water smelted in a furnace or cooked on a campfire converts to clean water with XP rewards.
-
Effects & Damage Drinking dirty water applies configurable poison effects. Low water levels apply slowness. When water reaches zero, a repeating task damages the player periodically until water is restored or the player dies.
-
Visual & User Feedback Water level is shown on the XP bar. Action bar messages notify players of low water and dehydration status without spamming.
-
Configuration & Customization All parameters including biome water loss rates, potion effect durations, damage amounts, and recipe timings are configurable in config.yml for server owners to balance gameplay.
-
Event Handling & Safety The plugin carefully manages inventory changes, prevents exploits, and cancels dehydration tasks on player death or respawn to ensure smooth gameplay.