? 口渴机制
- 每位玩家都有一个水量值,范围从零到配置文件中设置的最大值。当前水量会通过屏幕上的水条实时显示。
- 水量会随时间缓慢流失——每十秒流失一次。流失量的多少取决于玩家所在的位置以及正在执行的动作:
- 炎热地区的水量流失速度要快得多,寒冷地区的流失速度则慢得多,其他区域使用中等速率。
- 活跃状态会导致更多流失: 疾跑、跳跃、游泳、挖掘和战斗都会增加流失量,如果同时发生多种动作,这些流失量会叠加。
- 低水量会有提示。 当水量降至警告阈值时,系统会告知玩家水量不足。到达临界值时,将开始产生低水量负面效果。
- 零水量会造成伤害。 一旦水量归零,玩家将按固定间隔受到伤害,直到喝水或死亡。因此类原因死亡的玩家会收到专属的“脱水”死亡信息。
- 所有人初始满血(满水)。 新加入游戏的玩家以及在死亡后复活的玩家,其初始水量都会重置为起始值。
- 创造模式和旁观者模式不受影响。 他们不会丢失水量,也不会受到口渴伤害,因此建造和观战行为永远不会被打断。
? 水条显示
水条可以通过四种不同的方式展示,由服务器进行选择:
- 经验条 — 填充在快捷栏上方的经验条中。默认选项。
- 操作栏 (Action Bar) — 快捷栏上方的一行文本,也会显示当前数值,例如
87/100,并且在水位降低时会变为黄色或红色。
- Boss 进度条 — 屏幕顶部的一条彩色进度条,与分段样式搭配效果良好。
- 侧边栏面板 — 屏幕侧面显示进度条的一个小面板。当此显示方式激活时,它会接管侧边栏。
进度条本身完全可调节:包括分段数量、用于填充和空白部分的符号,以及各部分所使用的颜色。
⚙️ 配置文件
所有设置均位于 config.yml 中。所有以刻(ticks)为单位的时间测量均使用 Minecraft 刻,其中 1 秒等于 20 刻。
? 水量等级
max-water — 玩家所能拥有的最高水量值。其他所有设定都基于此值:进度条、警告、命令和占位符等都会使用它,因此数值越小,整个系统的难度就越高。
starting-water — 玩家首次加入游戏以及死亡复活时的初始水量。
dirty-water-restore — 饮用脏水所恢复的水量。
clean-water-restore — 饮用干净水所恢复的水量。故意将其设置为远高于脏水的数值。
⚠️ 阈值
low-water — 玩家开始收到警告的水量等级。当进度条达到此点时,会出现警告提示,并开始产生“低水量”负面效果。
critical — 情况变得危急的水量等级。更强的“危急”负面效果将取代低水量效果。此值不得高于警告阈值。
? 显示设置
display.type — 使用哪种水条显示方式。有效选项为 EXP、ACTION_BAR、BOSS_BAR 和 SCOREBOARD。
display.bar-length — 进度条由多少个分段组成。数值越大,进度条越精确。
display.filled-symbol 和 display.empty-symbol — 用于进度条填充部分和空白部分的字符。
display.filled-color 和 display.empty-color — 这两部分的配色。可以使用任何 Minecraft 颜色名称,如 AQUA、BLUE、GOLD 或 DARK_GRAY。
display.boss-bar.color — Boss 进度条的颜色,例如 BLUE、RED、GREEN、YELLOW、PURPLE、PINK 或 WHITE。
display.boss-bar.style — Boss 进度条的形状:SOLID(实心)或各种分段样式,后者非常适合表现水条。
display.scoreboard.title — 显示在侧边栏面板上方的标签。
? 水量流失
default-loss — 在非炎热或非寒冷区域(即未特别列出的区域),每个周期流失的水量。
hot-loss — 在炎热区域(如沙漠、恶地、暖水海洋和下界),每个周期流失的水量。默认情况下,炎热区域的流失速度约为普通区域的两倍。
cold-loss — 在寒冷区域(如 snowy plains、冰刺、冻结的海洋和冻结的山峰),每个周期流失的水量。默认情况下,寒冷区域的流失速度约为普通区域的一半。
hot-biomes 和 cold-biomes — 使用上述两种流失速率的生物群系列表。名称必须与游戏内置的区域名称完全匹配。任何未列出的区域都将使用默认流失率。
activity-multipliers — 每项活动额外消耗的水量倍数。它们可以叠加,因此一边疾跑一边挖掘的玩家比仅疾跑的玩家流失水量更快。
default — 始终应用于所有玩家的乘数。
sprinting、jumping、swimming、mining、fighting — 每项活动的额外消耗成本。将其设置为 1.0 表示该活动不消耗额外水量,而高于 1.0 的值则表示消耗更多。
✨ 负面效果
notification-radius — 玩家距离熔炉或营火多远时仍能看到净化消息的方块数。
dirty-water.poison-duration — 脏水中毒效果的持续时间,单位为刻(ticks)。
dirty-water.poison-strength — 该中毒效果的强度,其中 0 为最弱等级。
dehydration.damage-amount — 缺水玩家每次受到伤害时的伤害量,其中 2 等于一颗心(1点生命值)。
dehydration.damage-interval-ticks — 该伤害触发的频率,单位为刻(ticks)。
dehydration.death-message — 玩家因脱水死亡时显示的消息。使用 %player% 代表玩家名称,使用 & 进行颜色代码设置,或留空以完全隐藏消息。
low-water.slowness-type — 当水量降至危险水平时施加的效果。任何药水效果名称均可,例如 SLOWNESS、WEAKNESS 或 MINING_FATIGUE。仅当下方自定义效果禁用时才使用此设置。
low-water.slowness-duration — 该效果的持续时间,单位为刻(ticks)。
low-water.slowness-amplifier — 该效果的强度,其中 0 为最弱等级。
custom-effects.enabled — 开启自定义效果列表。启用后,将替代上述迟缓设置使用。
custom-effects.low — 在警告级别施加的效果。每项条目需要包含一个效果名称、以刻为单位的持续时间和强度。
custom-effects.critical-low — 在危急级别施加的效果。当玩家水量降至该水平时,这些效果将替换“低”级别的效果。
? 水袋 (Waterskin)
max-charges — 满充水袋可容纳的饮用量。数值越大,其作为生存工具的强度越高,同时也影响净化过程中可保留的充能次数。
purification-time-ticks — 脏水袋在营火上净化所需的时间,单位为刻(ticks)。
? 炼药锅 (Cauldron)
fill-rate-ticks — 下雨期间服务器检查附近炼药锅的频率。
fill-chance — 符合条件的炼药锅在每次检查中获得一级水的概率,其中 0.25 表示四分之一的几率。
scan-radius — 围绕每位在线玩家检查炼药锅的范围半径。较大的半径覆盖范围更广但检查成本更高,因此在繁忙服务器上请保持适中。
? 命令
| 命令 |
功能 |
/water check |
显示你自己的水量及最大值。 |
/water check <player> |
显示其他玩家的水量。 |
/water give <clean|dirty|waterskin> |
给予你一瓶净水、一瓶脏水或一个空水袋。 |
/water set <player> <amount> |
将某玩家的水量设置为指定数值。 |
/water add <player> <amount> |
向某玩家增加水量。负数表示减少水量。 |
/water reset <player> |
将某玩家的水量重置为初始值。 |
/water reload |
重新加载所有设置、区域速率、水条和配方,无需重启服务器。 |
/water help |
显示你有权使用的命令列表。 |
所有命令均支持 Tab 补全,因此命令名、物品名和玩家名会在输入时自动填充。管理命令也可从服务器控制台执行,但 give 命令除外,因为它需要一个接收物品的玩家。
提供给 set、add 和 reset 的值始终保持在有效范围内,因此任何人都无法被推高至最大值以上或低于零。
? 权限
| 权限 |
授予访问权 |
默认值 |
thirstbar.use |
查看自己的水量和使用帮助命令。 |
所有人 |
thirstbar.admin |
give、set、add 和 reset 命令,以及查看其他玩家的水量。 |
管理员 (Operators) |
thirstbar.reload |
reload 命令。 |
管理员 (Operators) |
? 占位符 (Placeholders)
安装 PlaceholderAPI 后,以下占位符可在支持占位符的任何地方使用,例如计分板、聊天或标签页列表:
%thirstbar_water_level% — 玩家的整型水量值,例如 87。
%thirstbar_water_level_formatted% — 带一位小数的相同水量值,例如 87.3。
%thirstbar_water_percentage% — 相对于最大值的百分比水量。
%thirstbar_water_bar% — 使用配置中设置的符号和颜色的现成视觉水条,使其始终与玩家屏幕上看到的一致。
? 物品与合成
脏水瓶 (Dirty Water Bottle)
一瓶浑浊的水。饮用它会恢复少量水分但会使玩家中毒,因此最好先进行净化。
净水瓶 (Clean Water Bottle)
安全清爽的水,无副作用地恢复大量水分。
- 获取方式: 净化脏水、从雨水收集炼药锅中取水,或在瓶装任何其他水源时有极小几率获得。
水袋 (Waterskin)
一种可重复使用的容器,可同时容纳多份饮用水,节省宝贵的背包空间。它会发光以突出显示,且描述文字始终显示剩余充能次数或为空的状态。
- 合成: 皮革、线和一个玻璃瓶在中间围成 "U" 形排列:
L S L
S G S
L S L
(L = 皮革, S = 线, G = 玻璃瓶)
- 注水: 右键点击水源并使用空水袋即可装满。装满的水袋始终含有脏水,因此在安全饮用前需要净化。
- 饮用: 手持已充能的水袋右键点击即可饮用。每次饮用消耗一次充能,描述文字会立即更新。
? 净化水
脏水和脏水袋可通过两种方式变为净水:
- 熔炉 — 像处理其他物品一样烧炼它们。
- 营火 — 在营火上烹饪它们。
脏水袋在净化后会保留原有的充能次数,既不浪费也不增加。附近有玩家在净化开始和结束时可以看到简短的消息,该消息的传播距离可在配置中设置。
? 雨水收集炼药锅
暴露在雨中的炼药锅会随时间缓慢收集洁净的水,每次增加一个等级,但仅在下雨期间且炼药锅能直接看到天空时才会发生。用玻璃瓶或空水囊从已满的炼药锅中取水会降低其水位一级,因此对于有耐心等待下雨的玩家来说,炼药锅是一种可再生的洁净水源。
? 玩家数据与更新
- 会话之间的水位会被记住,并在服务器运行时定期保存,同时在玩家登出和服务器停止时也进行保存,因此崩溃不会导致数据丢失。
- 仅在玩家在线时跟踪记录,因此大型服务器不会随着时间推移积累闲置数据。
- 从旧版本更新时,插件会添加新选项,但现有的配置文件不会包含这些新选项。控制台会以警告形式报告缺失的选项,内置默认值在此期间确保一切正常运行。建议的做法是从全新的配置文件中复制新选项到你的配置文件中以启用它们。
? How Thirst Works
- Every player has a water level, from nothing up to the maximum set in the configuration. The current level is shown on screen at all times through the water bar.
- Water drains slowly over time — once every ten seconds. How much is lost depends on where the player is and what they are doing:
- Hot places drain water much faster, cold places drain it much more slowly, and anywhere else uses a middle rate.
- Being active drains more: sprinting, jumping, swimming, mining and fighting all increase the drain, and they stack when several happen at once.
- Low water is announced. When the level falls to the warning point, the player is told their water is low. At the critical point, low-water effects begin.
- No water means damage. Once the level reaches zero, the player takes damage on a repeating timer until they drink or die. Players who die this way get their own dehydration death message.
- Everyone starts with a full bar. New players and players who respawn after dying return to the starting water level.
- Creative and spectator players are not affected. They never lose water and never take thirst damage, so building and spectating are never interrupted.
? Water Bar Displays
The water bar can be shown in four different ways, chosen by the server:
- Experience bar — fills the experience bar above the hotbar. Default.
- Action bar — a line of text above the hotbar that also shows the current level, for example
87/100, and turns yellow or red as water runs low.
- Boss bar — a coloured bar along the top of the screen, which works well with the segmented styles.
- Sidebar panel — a small panel on the side of the screen showing the bar. While this display is active it takes over the sidebar.
The bar itself is fully adjustable: how many segments it has, which symbols are used for filled and empty segments, and which colours are used for each.
⚙️ Configuration
All settings live in config.yml. Every duration measured in ticks uses Minecraft ticks, where 1 second equals 20 ticks.
? Water Levels
max-water — the highest water level a player can have. Everything else follows this value: the bar, the warnings, the commands and the placeholders all use it, so a smaller number makes the whole system harder.
starting-water — the level a player begins with when they first join and when they respawn after dying.
dirty-water-restore — how much water is gained by drinking dirty water.
clean-water-restore — how much water is gained by drinking clean water. This is intentionally much larger than dirty water.
⚠️ Thresholds
low-water — the level at which players start being warned. When the bar reaches this point the warning appears, and the "low" effects begin.
critical — the level at which the situation becomes critical. The stronger "critical" effects replace the low ones. This value must not be higher than the warning level.
? Display
display.type — which water bar display to use. Valid choices are EXP, ACTION_BAR, BOSS_BAR and SCOREBOARD.
display.bar-length — how many segments the bar is made of. A larger number gives a more precise bar.
display.filled-symbol and display.empty-symbol — the characters used for the filled and empty parts of the bar.
display.filled-color and display.empty-color — the colours of those two parts. Any Minecraft colour name works, such as AQUA, BLUE, GOLD or DARK_GRAY.
display.boss-bar.color — the colour of the boss bar, for example BLUE, RED, GREEN, YELLOW, PURPLE, PINK or WHITE.
display.boss-bar.style — the shape of the boss bar: SOLID or one of the segmented styles, which suit a water bar well.
display.scoreboard.title — the label shown above the sidebar panel.
? Water Loss
default-loss — how much water is lost every cycle anywhere that is not listed as a hot or cold area.
hot-loss — how much water is lost every cycle in hot areas, such as deserts, badlands, warm oceans and the nether. Hot areas drain about twice as fast by default.
cold-loss — how much water is lost every cycle in cold areas, such as snowy plains, ice spikes, frozen oceans and frozen peaks. Cold areas drain about half as fast by default.
hot-biomes and cold-biomes — the lists of areas that use those two rates. Names must match the game's own area names exactly. Any area that is not listed uses the default rate.
activity-multipliers — how much extra water each activity costs. They stack, so a player who is sprinting while mining loses water faster than one who is only sprinting.
default — a multiplier applied to everyone at all times.
sprinting, jumping, swimming, mining, fighting — the extra cost of each activity. Setting one to 1.0 makes that activity cost nothing extra, and values above 1.0 make it cost more.
✨ Effects
notification-radius — how many blocks away a player can be from a furnace or campfire and still see purification messages.
dirty-water.poison-duration — how long the poison from dirty water lasts, in ticks.
dirty-water.poison-strength — how strong that poison is, where 0 is the weakest level.
dehydration.damage-amount — how much damage is dealt each time a player with no water is hurt, where 2 equals one heart.
dehydration.damage-interval-ticks — how often that damage is dealt, in ticks.
dehydration.death-message — the message shown when a player dies of dehydration. Use %player% for the name, colour codes with &, or leave it empty to hide the message entirely.
low-water.slowness-type — the effect applied when water drops to the critical level. Any potion effect name works, such as SLOWNESS, WEAKNESS or MINING_FATIGUE. This is only used while the custom effects below are disabled.
low-water.slowness-duration — how long that effect lasts, in ticks.
low-water.slowness-amplifier — how strong that effect is, where 0 is the weakest level.
custom-effects.enabled — turns the custom effect lists on. When enabled, they are used instead of the slowness settings above.
custom-effects.low — the effects applied at the warning level. Each entry needs an effect name, a duration in ticks and a strength.
custom-effects.critical-low — the effects applied at the critical level. These replace the "low" effects once a player drops this far.
? Waterskin
max-charges — how many drinks a full waterskin holds. A larger number makes it a much stronger survival tool, and also changes how many charges can be carried over during purification.
purification-time-ticks — how long a dirty waterskin takes to purify on a campfire.
? Cauldron
fill-rate-ticks — how often the server checks nearby cauldrons during rain.
fill-chance — the chance that an eligible cauldron gains one water level each check, where 0.25 means a quarter of the time.
scan-radius — how far around each online player cauldrons are checked. A larger radius covers more ground but costs more to check, so keep it modest on busy servers.
? Commands
| Command |
What it does |
/water check |
Shows your own water level and the maximum. |
/water check <player> |
Shows another player's water level. |
/water give <clean|dirty|waterskin> |
Gives you a clean water bottle, a dirty water bottle, or an empty waterskin. |
/water set <player> <amount> |
Sets a player's water level to an exact amount. |
/water add <player> <amount> |
Adds water to a player. A negative amount takes water away. |
/water reset <player> |
Returns a player to the starting water level. |
/water reload |
Reloads all settings, the area rates, the water bar and the recipes without restarting the server. |
/water help |
Shows the commands you are allowed to use. |
Every command can be completed with tab, so command names, item names and player names fill in as you type. Admin commands also work from the server console, except the give command, which needs a player to receive the item.
Values given to set, add and reset are always kept inside the valid range, so nobody can be pushed above the maximum or below zero.
? Permissions
| Permission |
Gives access to |
Default |
thirstbar.use |
Checking your own water level and using the help command. |
Everyone |
thirstbar.admin |
The give, set, add and reset commands, and checking other players. |
Operators |
thirstbar.reload |
The reload command. |
Operators |
? Placeholders
With PlaceholderAPI installed, these values are available anywhere placeholders are supported, such as scoreboards, chat or tab lists:
%thirstbar_water_level% — the player's water level as a whole number, for example 87.
%thirstbar_water_level_formatted% — the same level with one decimal place, for example 87.3.
%thirstbar_water_percentage% — the level as a percentage of the maximum.
%thirstbar_water_bar% — a ready-made visual bar using the symbols and colours set in the configuration, so it always matches what players see on screen.
? Items and Crafting
Dirty Water Bottle
A glass bottle of murky water. Drinking it restores a small amount of water but poisons the player, so it is best purified first.
- Crafting: a glass bottle with a piece of dirt, in any arrangement.
Clean Water Bottle
Safe, refreshing water that restores a large amount of water with no side effects.
- Obtained by: purifying dirty water, collecting water from a rainwater cauldron, or the small chance when bottling any other water source.
Waterskin
A reusable container that holds several drinks at once, saving precious inventory space. It glows so it stands out, and its description always shows how many charges are left or that it is empty.
- Crafting: leather, string and a glass bottle in a "U" shape around the middle:
L S L
S G S
L S L
(L = Leather, S = String, G = Glass Bottle)
- Filling: right-click a water source with an empty waterskin to fill it. Filled waterskins always contain dirty water, so they need purifying before they are safe to drink.
- Drinking: right-click with a charged waterskin to take a drink. Each drink uses one charge, and the description updates immediately.
? Purifying Water
Dirty water and dirty waterskins become clean in two ways:
- Furnace — smelt them like any other item.
- Campfire — cook them on a campfire.
A dirty waterskin keeps exactly as many charges as it had, so nothing is wasted and nothing is gained. Nearby players see a short message when purification starts and finishes, and how far that message reaches can be set in the configuration.
? Rainwater Cauldrons
Cauldrons left out in the rain slowly collect clean water, one level at a time, but only while it is actually raining and only when they have a clear view of the sky. Water taken from a filled cauldron with a bottle or an empty waterskin lowers it by one level, so cauldrons are a renewable supply of clean water for anyone patient enough to wait for rain.
? Player Data and Updating
- Water levels are remembered between sessions and are saved regularly while the server runs, as well as when players log out and when the server stops, so nothing is lost in a crash.
- Players are only tracked while they are online, so large servers do not build up idle data over time.
- When updating from an older version, new options are added to the plugin but an existing settings file will not contain them. The console reports any missing options with a warning, and the built-in defaults keep everything working in the meantime. Copying the new options from a fresh settings file into your own is the recommended way to pick them up.
评论 0
登录后参与评分
还没有评论,来抢沙发吧