概览
本模组添加了一个高度可配置的 /heal 命令,用于治疗玩家。配置选项包括每个玩家每次生命可用的 /heal 次数、每次使用 /heal 为目标恢复多少生命值、每次使用 /heal 对治疗者造成多少伤害(默认为 0)等。
/heal 命令还包含一些管理子命令,用于查询玩家的治疗数据、恢复玩家使用 /heal 的能力等。
/heal
/heal 命令本身目前使用相对简单的语法,并带有几个选项。
/heal <player> 根据当前的 healAmount 治疗目标,并根据 healCost 对治疗者造成伤害。任何权限等级高于 healPermissionsRequirement 的玩家均可使用。在默认设置下,任何人都可以使用它。
/heal query uses <player> 显示目标已消耗的 /heal 使用次数以及当前 healsPerLife 的值。需要至少权限等级 2 的玩家方可使用。
/heal query deaths <player> 显示目标剩余多少次死亡可以恢复治疗能力。需要至少权限等级 2 的玩家方可使用。
/heal restore uses <player> 为目标恢复所有 /heal 使用次数。需要至少权限等级 2 的玩家方可使用。
/heal restore uses <player> <n> 为目标恢复 n 次 /heal 使用次数;这可以超过 healsPerLife 的总使用次数上限,从而赋予该玩家额外的容量。需要至少权限等级 2 的玩家方可使用。
/heal restore deaths <player> 重置目标的死亡计数器。需要至少权限等级 2 的玩家方可使用。
/heal restore deaths <player> <n> 为目标恢复 n 次死亡计数;这可以超过 deathsRestoringHeals 的总死亡次数上限,从而赋予该玩家额外的容量。需要至少权限等级 2 的玩家方可使用。
配置
本模组通过游戏内规则(gamerules)进行配置:
healAmount 设定每次 /heal 恢复的生命值,默认为 200(100颗心)。
healCost 设定每次 /heal 从治疗者身上移除的生命值,默认为 0。
healsPerLife 设定每个玩家拥有的 /heal 使用次数,默认为 1(设为 -1 表示无限次数)。
deathsRestoringHeals 控制需要多少次死亡才能恢复治疗能力,默认为 -1(设为 -1 表示无限死亡次数)。
healPermissionsRequirement 设定运行 /heal 所需的权限等级,默认为 0(任何人都可以使用)。
safeHealing 控制当存在 healCost 时,玩家是否可以通过 /heal 其他玩家而致命地伤害自己。默认为 true;当玩家剩余生命值不足以支付代价时,系统将阻止其使用 /heal。
注意
本模组在 CurseForge 上以 "Configurable Healing Command" 的名称发布。由于 CurseForge 平台的限制,不允许在模组标题中使用 "Mod" 一词,因此我不得不为其取一个不同的名称。对此造成的困惑深表歉意。
Overview
This mod adds a highly configurable /heal command used to heal players. Configuration options include the number of uses of /heal that each player gets per life, how much each use of /heal heals the target, how much each use of /heal damages the healer (defaulting to 0) and more.
The /heal command also includes administrative subcommands used to query player healing data, restore the ability to use /heal to a player, and so forth.
/heal
The /heal command itself uses a relatively simple syntax with several options at the moment.
/heal <player> heals the target by the current healAmount and damages the healer by healCost. It is available to any player with permissions higher than healPermissionsRequirement. With the default settings, anyone can use it.
/heal query uses <player> displays the number of /heal uses that the target has expended, as well as the current value of healsPerLife. It is available to any player with a permission level of at least 2.
/heal query deaths <player> displays the number of deaths that the target has remaining that will restore healing capacity. It is available to any player with a permission level of at least 2.
/heal restore uses <player> restores all /heal uses to the target. It is available to any player with a permission level of at least 2.
/heal restore uses <player> <n> restores n uses of /healto the target; this can exceed healsPerLife total uses, giving that player extra capacity. It is available to any player with a permission level of at least 2.
/heal restore deaths <player> resets the deaths counter for the target. It is available to any player with a permission level of at least 2.
/heal restore deaths <player> <n> restores n deaths to the target; this can exceed deathsRestoringHeals total deaths, giving that player extra capacity. It is available to any player with a permission level of at least 2.
Configuration
The mod is configured via gamerules:
healAmount sets how much each /heal restores, defaulting to 200 (100 hearts).
healCost sets how much health each /heal removes from the healer, defaulting to 0.
healsPerLife sets how many uses of /heal each player has, defaulting to 1 (set to -1 for infinite uses).
deathsRestoringHeals controls now many deaths will restore healing capacity, defaulting to -1 (set to -1 for unlimited deaths).
healPermissionsRequirement is what permissions level is needed to run /heal, defaulting to 0 (anyone can use it).
safeHealing controls, given that there is a healCost, whether or not players can fatally damage themselves by /healing other players. Defaults to true; players are prevented from using /heal when they have less health than is needed to pay the cost.
Note
This mod is released on CurseForge as "Configurable Healing Command". CurseForge platform restrictions prevent using "Mod" in mod titles, so I had to name it something different there. I apologize for the confusion.
评论 0
登录后参与评分
还没有评论,来抢沙发吧