功能特性
生命值(心)
- 每位玩家都有一定数量的心,这决定了他们的最大生命值。
- 新玩家初始拥有可配置的心数量。
- 存在一个可配置的玩家可达到的最大心数上限。
- 玩家可以提取心,将其转化为可交易的心物品。
- 玩家可以消耗心物品来提升其最大生命值。
- 心物品的合成配方完全可配置。
- 普通的附魔金苹果不受影响——只有插件特有的心物品具有特殊效果。
失去心
- 心可以在每次死亡时丢失、仅在玩家击杀时丢失,或永不丢失。
- 你可以将心的丢失限制在特定的世界中。
- 虚空死亡不会扣除心。
- 可以配置一段保护期,防止玩家在加入服务器或被复活后立即失去心。
淘汰与复活
- 当玩家失去最后一颗心时,他们将被淘汰。
- 淘汰惩罚是可配置的:可以将他们设为旁观者、踢出服务器、暂时(或永久)封禁,或者掉落其物品栏。
- 被淘汰的玩家即使在世界重启后仍保持淘汰状态。
- 一种可合成的复活道具可以让玩家将已淘汰的玩家复活。
- 右键点击复活道具会打开一个包含所有已淘汰玩家的菜单。
- 该菜单支持分页,带有箭头按钮用于切换页面,点击某位玩家即可将其复活。
- 管理员可以立即复活玩家而无需消耗道具。
- 普通玩家可以通过使用自己的复活道具来复活他人。
- 管理员可以直接发放复活道具。
交易与赠送
- 玩家可以通过专用的交易窗口互相交易物品。
- 玩家可以互相赠送心。
- 交易请求会在可配置的时间后过期。
- 可以设置赠送心和提取心的冷却时间。
心商店
- 心商店允许玩家使用服务器货币购买和出售心。
- 商店默认禁用,仅在安装 Vault 插件时生效。
- 购买和出售功能可以独立启用或禁用。
- 价格、每次购买的数量、最大持有心数以及最低保留心数均可配置。
消息与占位符
- 插件中的所有消息均可完全自定义。
- 可以通过 PlaceholderAPI 显示心相关信息。
命令
| 命令 |
描述 |
权限 |
/lifesteal |
显示可用子命令列表。 |
— |
/lifesteal reload |
重新加载配置文件和消息文件。 |
lifesteal.admin |
/lifesteal give <player> <amount> |
向玩家给予心物品。 |
lifesteal.admin |
/lifesteal giverevive <player> [amount] |
向玩家给予复活道具。 |
lifesteal.admin |
/lifesteal revive <player> |
立即复活一名已被淘汰的玩家。 |
lifesteal.admin |
/lifesteal stats [player] |
显示你自己或(拥有权限时)其他玩家的心统计信息。 |
查看其他玩家时需 lifesteal.admin |
/lifesteal giveheart <player> <amount> |
将自己的一部分心赠予其他玩家。 |
lifesteal.giveheart |
/lifesteal trade <player> |
发送交易请求。 |
lifesteal.trade |
/lifesteal trade accept |
接受待处理的交易请求。 |
lifesteal.trade |
/lifesteal shop |
打开心商店。 |
lifesteal.shop |
/withdraw [amount] |
将心提取为心物品。 |
lifesteal.withdraw |
/revive <player> |
使用你的复活道具之一复活一名已被淘汰的玩家。 |
lifesteal.revive |
/adminrevive <player> |
不使用道具直接复活一名已被淘汰的玩家。 |
lifesteal.admin |
权限
| 权限 |
默认分配给 |
描述 |
lifesteal.admin |
操作员 (Operators) |
访问所有管理命令。 |
lifesteal.withdraw |
所有人 |
允许提取心。 |
lifesteal.revive |
所有人 |
允许使用复活道具复活他人。 |
lifesteal.trade |
所有人 |
允许与其他玩家交易。 |
lifesteal.giveheart |
所有人 |
允许赠送心。 |
lifesteal.shop |
所有人 |
允许打开心商店。 |
占位符
当安装了 PlaceholderAPI 时,可使用以下占位符:
| 占位符 |
描述 |
%lifesteal_hearts% |
玩家当前的生命值(心)。 |
%lifesteal_max_hearts% |
服务器上允许的最大生命值(心)数。 |
%lifesteal_withdrawn% |
玩家已提取的心数量。 |
%lifesteal_consumed% |
玩家已消耗的心数量。 |
%lifesteal_eliminated% |
如果玩家已被淘汰则为 true,否则为 false。 |
%lifesteal_status% |
alive(存活)或 eliminated(已淘汰)。 |
配置
所有设置均位于配置文件中。消息位于消息文件中,并使用 & 颜色代码及 {placeholder} 占位符值。
常规设置
| 设置项 |
作用 |
default-hearts |
新玩家初始拥有的心数量,以及被复活时恢复的心数量。 |
max-hearts |
任何玩家能达到的最高心数。 |
enabled-worlds |
适用“失去心”机制的世界。留空表示适用于所有世界。 |
lose-hearts |
何时失去心。true 始终发生,false 从不发生,pvp 仅在被其他玩家杀死时发生。 |
grace-period-seconds |
加入服务器或被复活后免受失去心影响的保护秒数。设为 0 则禁用此保护。 |
淘汰
| 设置项 |
功能说明 |
elimination.enabled |
是否允许玩家被淘汰。禁用后,玩家的血量永远不会低于半颗心。 |
elimination.punishment |
玩家被淘汰时的惩罚方式:SPECTATOR(旁观者模式)、KICK(踢出服务器)、BAN(封禁)或 DROP(掉落物品)。 |
elimination.kick-message |
被踢出或封禁的被淘汰玩家看到的消息。 |
elimination.ban-duration-seconds |
封禁时长(秒)。设为 0 表示永久封禁。仅在 BAN 模式下生效。 |
elimination.drop-inventory |
同时掉落被淘汰玩家的背包物品。当启用“死亡保留物品”时非常有用。 |
elimination.broadcast |
是否在玩家被淘汰时发送全服广播消息。 |
心之道具
| 设置项 |
功能说明 |
heart-item.name |
心之道具的显示名称。 |
heart-item.lore |
心之道具的描述文本。 |
heart-item.hearts-per-item |
消耗一个心之道具所增加的心数。 |
合成配方
| 设置项 |
功能说明 |
recipe.enabled |
是否启用心之道具的合成配方。 |
recipe.shape.1, .2, .3 |
合成台工作台的三行布局。 |
recipe.A … recipe.F |
合成表中每个字符对应的原料。 |
复活道具
| 设置项 |
功能说明 |
revive-item.enabled |
是否启用复活道具及其合成配方。 |
revive-item.material |
复活道具的基础材质。 |
revive-item.name |
复活道具的显示名称。 |
revive-item.lore |
复活道具的描述文本。 |
revive-item.recipe.enabled |
是否启用复活道具的合成配方。 |
revive-item.recipe.shape.1, .2, .3 |
复活道具在合成台中的三行布局。 |
revive-item.recipe.A … E |
复活合成表中每个字符对应的原料。 |
交易
| 设置项 |
功能说明 |
trade.request-timeout-seconds |
交易请求在过期前的有效时长。 |
trade.giveheart-cooldown-seconds |
赠送心之间的冷却时间。设为 0 则禁用冷却。 |
trade.withdraw-cooldown-seconds |
撤回心之间的冷却时间。设为 0 则禁用冷却。 |
经济与商店
| 设置项 |
功能说明 |
economy.enabled |
心之商店的主开关。需要安装 Vault 插件。 |
economy.shop.buy.enabled |
是否允许玩家购买心。 |
economy.shop.buy.amount |
每次点击购买的心数量。 |
economy.shop.buy.price-per-heart |
购买单个心所需的费用。 |
economy.shop.buy.max-hearts |
购买后玩家拥有的最大心数量。设为 0 则使用主配置中的最大值。 |
economy.shop.sell.enabled |
是否允许玩家出售心。 |
economy.shop.sell.amount |
每次点击出售的心数量。 |
economy.shop.sell.price-per-heart |
出售单个心所获得的金币数量。 |
economy.shop.sell.min-hearts |
出售后台玩家需要保留的最小心数量。 |
Features
Hearts
- Every player has a number of hearts that sets their maximum health.
- New players start with a configurable number of hearts.
- There is a configurable maximum number of hearts a player can reach.
- Players can withdraw hearts, turning them into tradeable heart items.
- Players can consume heart items to raise their maximum health.
- Heart items can be crafted with a fully configurable recipe.
- Normal enchanted golden apples are never affected — only the plugin's own heart items are special.
Losing hearts
- Hearts can be lost on every death, only on player kills, or never.
- You can restrict heart loss to specific worlds.
- Void deaths never cost a heart.
- A configurable protection period can prevent heart loss right after joining or being revived.
Elimination and revival
- When a player loses their last heart they can be eliminated.
- The elimination punishment is configurable: send them to spectator, kick them, ban them for a
set time (or permanently), or drop their inventory.
- Eliminated players stay eliminated even after the server restarts.
- A craftable revival item lets players bring the eliminated back.
- Right-clicking a revival item opens a menu of every eliminated player.
- The menu is paged, with arrows to move between pages, and clicking a player revives them.
- Operators can revive a player instantly without spending an item.
- Regular players can revive a player by using one of their own revival items.
- Operators can hand out revival items directly.
Trading and gifting
- Players can trade items with each other through a dedicated trade window.
- Players can gift hearts to each other.
- Trade requests expire after a configurable time.
- Cooldowns can be set for gifting hearts and withdrawing hearts.
Heart shop
- A heart shop lets players buy and sell hearts using server currency.
- The shop is disabled by default and only works when Vault is installed.
- Buying and selling can be enabled or disabled independently.
- Prices, amounts per purchase, maximum hearts and minimum hearts to keep are all configurable.
Messages and placeholders
- Every message in the plugin is fully customizable.
- Heart information can be shown with PlaceholderAPI.
Commands
| Command |
Description |
Permission |
/lifesteal |
Shows the list of available subcommands. |
— |
/lifesteal reload |
Reloads the configuration and messages. |
lifesteal.admin |
/lifesteal give <player> <amount> |
Gives heart items to a player. |
lifesteal.admin |
/lifesteal giverevive <player> [amount] |
Gives revival items to a player. |
lifesteal.admin |
/lifesteal revive <player> |
Revives an eliminated player instantly. |
lifesteal.admin |
/lifesteal stats [player] |
Shows heart statistics for yourself or, with permission, another player. |
lifesteal.admin when viewing another player |
/lifesteal giveheart <player> <amount> |
Gifts your own hearts to another player. |
lifesteal.giveheart |
/lifesteal trade <player> |
Sends a trade request. |
lifesteal.trade |
/lifesteal trade accept |
Accepts a pending trade request. |
lifesteal.trade |
/lifesteal shop |
Opens the heart shop. |
lifesteal.shop |
/withdraw [amount] |
Withdraws hearts as heart items. |
lifesteal.withdraw |
/revive <player> |
Revives an eliminated player using one of your revival items. |
lifesteal.revive |
/adminrevive <player> |
Revives an eliminated player without using an item. |
lifesteal.admin |
Permissions
| Permission |
Default |
Description |
lifesteal.admin |
Operators |
Access to all administrative commands. |
lifesteal.withdraw |
Everyone |
Allows withdrawing hearts. |
lifesteal.revive |
Everyone |
Allows reviving others with a revival item. |
lifesteal.trade |
Everyone |
Allows trading with other players. |
lifesteal.giveheart |
Everyone |
Allows gifting hearts. |
lifesteal.shop |
Everyone |
Allows opening the heart shop. |
Placeholders
When PlaceholderAPI is installed, the following placeholders are available:
| Placeholder |
Description |
%lifesteal_hearts% |
The player's current hearts. |
%lifesteal_max_hearts% |
The maximum hearts allowed on the server. |
%lifesteal_withdrawn% |
How many hearts the player has withdrawn. |
%lifesteal_consumed% |
How many hearts the player has consumed. |
%lifesteal_eliminated% |
true if the player is eliminated, otherwise false. |
%lifesteal_status% |
alive or eliminated. |
Configuration
All settings live in the configuration file. Messages live in the messages file and use &
colour codes with {placeholder} values.
General
| Setting |
What it does |
default-hearts |
How many hearts a new player starts with and how many hearts a player is revived with. |
max-hearts |
The highest number of hearts any player can reach. |
enabled-worlds |
The worlds where losing hearts applies. Leave it empty to apply everywhere. |
lose-hearts |
When hearts are lost. true always, false never, pvp only when killed by another player. |
grace-period-seconds |
Seconds of protection from heart loss after joining or being revived. 0 disables it. |
Elimination
| Setting |
What it does |
elimination.enabled |
Whether players can be eliminated. When disabled, players can never fall below one heart. |
elimination.punishment |
What happens on elimination: SPECTATOR, KICK, BAN or DROP. |
elimination.kick-message |
The message shown to a kicked or banned eliminated player. |
elimination.ban-duration-seconds |
Ban length in seconds. 0 makes the ban permanent. Only used with BAN. |
elimination.drop-inventory |
Also drops the eliminated player's inventory. Useful when keeping items on death is enabled. |
elimination.broadcast |
Whether a server-wide message is sent when a player is eliminated. |
Heart item
| Setting |
What it does |
heart-item.name |
The display name of the heart item. |
heart-item.lore |
The lore lines of the heart item. |
heart-item.hearts-per-item |
How many hearts are gained by consuming one heart item. |
Heart recipe
| Setting |
What it does |
recipe.enabled |
Whether the heart crafting recipe is active. |
recipe.shape.1, .2, .3 |
The three rows of the crafting shape. |
recipe.A … recipe.F |
The ingredient used for each character in the shape. |
Revival item
| Setting |
What it does |
revive-item.enabled |
Whether the revival item and its recipe are active. |
revive-item.material |
The base material of the revival item. |
revive-item.name |
The display name of the revival item. |
revive-item.lore |
The lore lines of the revival item. |
revive-item.recipe.enabled |
Whether the revival item recipe is active. |
revive-item.recipe.shape.1, .2, .3 |
The three rows of the revival item's crafting shape. |
revive-item.recipe.A … E |
The ingredient used for each character in the revival shape. |
Trading
| Setting |
What it does |
trade.request-timeout-seconds |
How long a trade request stays valid before it expires. |
trade.giveheart-cooldown-seconds |
Cooldown between gifting hearts. 0 disables it. |
trade.withdraw-cooldown-seconds |
Cooldown between withdrawing hearts. 0 disables it. |
Economy and shop
| Setting |
What it does |
economy.enabled |
Master switch for the heart shop. Requires Vault. |
economy.shop.buy.enabled |
Whether players can buy hearts. |
economy.shop.buy.amount |
How many hearts are bought per click. |
economy.shop.buy.price-per-heart |
The cost of a single heart when buying. |
economy.shop.buy.max-hearts |
The maximum hearts a player may own after buying. 0 uses the main maximum. |
economy.shop.sell.enabled |
Whether players can sell hearts. |
economy.shop.sell.amount |
How many hearts are sold per click. |
economy.shop.sell.price-per-heart |
The money received for a single heart when selling. |
economy.shop.sell.min-hearts |
The number of hearts a player must keep after selling. |
评论 0
登录后参与评分
还没有评论,来抢沙发吧