LifeForge
适用于 Paper 1.21.x 的完整 Lifesteal SMP 体验 —— 掠夺心脏、制作它们、交易它们,并为生存而战。
概览
LifeForge 是一个功能齐全的 Lifesteal SMP 插件:每次击杀都会从受害者那里窃取一颗心脏,每次死亡都会失去一颗心脏,当你的心脏数量归零时,你将被服务器淘汰。心脏是一种真实存在的经济系统——你可以将它们提取为可交易的物品,进行制作,存入箱子,或在 PvP 中押注它们。被淘汰的玩家可以使用复活信标(Revive Beacons)复活,团队功能让你和朋友们能够互相保护,而赏金系统则利用 Vault 货币对服务器上通缉犯的头颅标价。
所有内容均为生产级服务器构建:所有数据库访问均异步运行(默认使用 SQLite,网络服可使用 MySQL),所有面向玩家显示的文本均位于 messages.yml 中,支持完整的 MiniMessage 和十六进制颜色代码,整个功能集——初始心脏数、上限、配方、淘汰模式、复活成本、限制等——均可通过 config.yml 进行配置。不使用 NMS,无反射调用,禁用时清理彻底。
已在 Paper 1.21.4 和 1.21.11 上测试。
特性
心脏系统
- 以可配置的初始心脏数开始游戏(默认 10 颗),最高可达可配置的上限(默认 20 颗)
- 击杀玩家:窃取一颗心脏。死亡:失去一颗心脏。两者均可完全开关控制
- 聊天中的击杀广播、淘汰广播以及标题屏幕效果——全部可自定义
- 实时 动作栏心脏 HUD,支持按玩家切换(
/hearts hud)
心脏物品
- 将心脏提取为发光的自定义玩家头颅物品(
/hearts withdraw)
- 右键点击 心脏物品将其存回你的生命值
- 心脏物品可以被丢弃、交易、存入箱子或出售——心脏成为生存服务器的货币
- 完全可配置的制作配方(形状 + 材料),或完全禁用制作
- 防重复保护: 精确到槽位的物品消耗以及制作网格防护,防止复制漏洞
淘汰机制
- 心脏数量达到 0 即被消灭——可在配置中选择模式:SPECTATOR(旁观者)、TEMP_BAN(例如 3 天禁赛)或 PERM_BAN(永久封禁)
- 淘汰时播放戏剧性的标题屏幕并向全服广播
- 可选:击杀者获得受害者的头颅(掉落概率可配置)
复活系统
- 复活信标 物品,拥有独立的可配置配方
- 右键点击打开复活菜单,将被淘汰的玩家复活
- 复活成本可配置:需要特定物品、Vault 货币,或两者都需要
- 复活的玩家将以可配置的心脏数回归(默认 5 颗)
- 管理员可以直接使用命令复活离线玩家
团队与联盟
- 创建团队,邀请好友,管理成员(
/team)
- 可配置团队人数上限
- 可选:盟友之间 永不 互相窃取心脏——避免友军误伤导致的心流失
赏金系统 (Vault)
- 对任何玩家放置 Vault 货币赏金(
/bounty place <player> <amount>)
- 击杀者自动领取赏金
- 可配置的最小/最大赏金金额
- 需要安装 Vault + 任意经济插件
内置反滥用机制
- 每位玩家的 每日提取限额(默认每天 10 颗心脏)
- 提取之间的 冷却时间(默认 60 秒)
- 最低心脏底线 —— 你永远不会将自己提取至零(默认:至少保留 1 颗)
- 每次存款时进行防重复物品检查
管理员工具箱
/lifesteal set|add|remove 为任何在线或离线玩家设置/增加/减少心脏
/lifesteal revive 和 /lifesteal eliminate 用于手动管理
/lifesteal reload —— 无需重启即可重新加载配置和消息文件
- 每个操作都有独立的管理员权限
命令
| 命令 |
别名 |
描述 |
权限 |
/lifesteal |
/lf, /life |
管理员:设置/增加/减少心脏,复活,淘汰,重载 |
lifeforge.admin |
/hearts |
/heart, /lives |
打开心脏菜单,提取与存储心脏,切换 HUD |
lifeforge.hearts |
/team |
/teams, /ally, /allies |
创建和管理你的团队或联盟 |
lifeforge.team |
/bounty |
/bounties |
放置或查看赏金(需要 Vault 经济插件) |
lifeforge.bounty |
管理员子命令: /lifesteal info|set|add|remove|revive|eliminate|reload
权限
| 权限 |
默认值 |
描述 |
lifeforge.* |
op |
所有 LifeForge 权限 |
lifeforge.admin |
op |
管理员命令访问权限(包含子权限:.set, .add, .remove, .revive, .eliminate, .reload) |
lifeforge.player |
everyone |
所有玩家功能(包含以下子权限) |
lifeforge.hearts |
everyone |
使用 /hearts(菜单,余额) |
lifeforge.withdraw |
everyone |
将心脏提取为物品 |
lifeforge.deposit |
everyone |
存储心脏物品(命令和右键点击) |
lifeforge.hud |
everyone |
切换动作栏心脏 HUD |
lifeforge.team |
everyone |
使用团队功能 |
lifeforge.bounty |
everyone |
使用赏金功能 |
lifeforge.revive |
everyone |
使用复活信标打开复活菜单 |
PlaceholderAPI 占位符
当安装 PlaceholderAPI 时自动注册(标识符:lifesteal)。
| 占位符 |
描述 |
%lifesteal_hearts% |
玩家当前心脏数(格式化显示) |
%lifesteal_hearts_raw% |
原始心脏数值 |
%lifesteal_max% |
服务器心脏上限 |
%lifesteal_rank% |
玩家在心脏排行榜中的排名 |
%lifesteal_top_N_name% |
排行榜第 N 位的玩家名称(已缓存) |
%lifesteal_top_N_hearts% |
排行榜第 N 位的玩家心脏数 |
%lifesteal_team% |
玩家的团队名称(若无则为 "None") |
%lifesteal_eliminated% |
玩家是否已被淘汰 |
%lifesteal_bounty% |
玩家当前的赏金金额 |
%lifesteal_hud% |
玩家 HUD 启用状态 |
%lifesteal_withdraws_left% |
今日剩余提取次数 |
%lifesteal_withdraw_cooldown% |
距离下次允许提取的剩余秒数 |
%lifesteal_bar% |
可视化心脏进度条 |
安装
- 将
LifeForge-1.0.0.jar 放入服务器的 plugins/ 文件夹中
- (可选) 安装 Vault 和经济类插件以启用赏金功能
- (可选) 安装 PlaceholderAPI 以便在计分板、标签页等地方使用占位符
存储
LifeForge 自带 SQLite 数据库,无需额外配置——在首次启动时会自动创建 plugins/LifeForge/data.db。对于服务器网络或高流量服务器,可在 config.yml 中将 storage.type 设置为 MYSQL(已内置 HikariCP 连接池)。所有数据均基于 UUID 并以异步方式存储,因此主线程不会因 I/O 操作而阻塞,且在关闭时会干净地刷新所有待写入的数据。
LifeForge
The complete Lifesteal SMP experience for Paper 1.21.x — steal hearts, craft them, trade them, and fight to stay alive.
Overview
LifeForge is a full-featured Lifesteal SMP plugin: every kill steals a heart from your victim, every death costs you one, and when your hearts hit zero you are eliminated from the server. Hearts are a real economy — withdraw them into tradeable items, craft them, store them in chests, or bet them all in PvP. Eliminated players can be brought back with Revive Beacons, teams let you and your friends protect each other, and bounties put Vault money on the heads of your server's most wanted.
Everything is built for real production servers: all database access runs asynchronously (SQLite by default, MySQL for networks), every player-facing string lives in messages.yml with full MiniMessage and hex color support, and the entire feature set — starting hearts, caps, recipes, elimination mode, revive costs, limits — is configurable from config.yml. No NMS, no reflection, clean unregistering on disable.
Tested on Paper 1.21.4 and 1.21.11.
Features
Heart System
- Start with a configurable number of hearts (default 10), up to a configurable cap (default 20)
- Kill a player: steal a heart. Die: lose one. Both fully toggleable
- Kill broadcasts in chat, elimination broadcasts, and title screens — all customizable
- Live actionbar heart HUD with per-player toggle (
/hearts hud)
Heart Items
- Withdraw hearts into glowing custom player-head items (
/hearts withdraw)
- Right-click a heart item to deposit it back into your health
- Heart items can be dropped, traded, stored in chests, or sold — hearts become the server currency of survival
- Fully configurable crafting recipe (shape + ingredients), or disable crafting entirely
- Anti-dupe protection: slot-precise item consumption plus a crafting-grid guard against duplication exploits
Elimination
- Reach 0 hearts and you're eliminated — choose the mode in config: SPECTATOR, TEMP_BAN (e.g. 3 days), or PERM_BAN
- Dramatic title screen and server-wide broadcast on elimination
- Optional: the killer takes the victim's head (with configurable drop chance)
Revival
- Revive Beacon item with its own configurable recipe
- Right-click to open the revive menu and bring an eliminated player back
- Revive costs are configurable: items required, Vault money required, or both
- Revived players return with a configurable heart count (default 5)
- Admins can revive offline players directly with a command
Teams & Alliances
- Create teams, invite friends, manage members (
/team)
- Configurable team size cap
- Optional: allies never steal hearts from each other — no friendly-fire heart loss
Bounties (Vault)
- Place a Vault-money bounty on any player (
/bounty place <player> <amount>)
- The killer claims the bounty automatically
- Configurable min/max bounty amounts
- Requires Vault + any economy plugin
Built-in Anti-Abuse
- Daily withdraw limit per player (default 10 hearts/day)
- Withdraw cooldown between withdrawals (default 60s)
- Minimum heart floor — you can never withdraw yourself to zero (default: keep at least 1)
- Anti-dupe item checks on every deposit
Admin Toolkit
/lifesteal set|add|remove hearts for any player, online or offline
/lifesteal revive and /lifesteal eliminate for manual moderation
/lifesteal reload — reload config and messages without a restart
- Separate admin permissions for every action
Commands
| Command |
Aliases |
Description |
Permission |
/lifesteal |
/lf, /life |
Admin: set/add/remove hearts, revive, eliminate, reload |
lifeforge.admin |
/hearts |
/heart, /lives |
Open the hearts menu, withdraw & deposit hearts, HUD toggle |
lifeforge.hearts |
/team |
/teams, /ally, /allies |
Create and manage your team or alliance |
lifeforge.team |
/bounty |
/bounties |
Place or view bounties (needs Vault economy) |
lifeforge.bounty |
Admin subcommands: /lifesteal info|set|add|remove|revive|eliminate|reload
Permissions
| Permission |
Default |
Description |
lifeforge.* |
op |
All LifeForge permissions |
lifeforge.admin |
op |
Admin command access (children: .set, .add, .remove, .revive, .eliminate, .reload) |
lifeforge.player |
everyone |
All player features (children below) |
lifeforge.hearts |
everyone |
Use /hearts (menu, balance) |
lifeforge.withdraw |
everyone |
Withdraw hearts into items |
lifeforge.deposit |
everyone |
Deposit heart items (command and right-click) |
lifeforge.hud |
everyone |
Toggle the actionbar heart HUD |
lifeforge.team |
everyone |
Use teams |
lifeforge.bounty |
everyone |
Use bounties |
lifeforge.revive |
everyone |
Open the revive menu with a Revive Beacon |
PlaceholderAPI Placeholders
Registered automatically when PlaceholderAPI is installed (identifier: lifesteal).
| Placeholder |
Description |
%lifesteal_hearts% |
Player's current hearts (formatted) |
%lifesteal_hearts_raw% |
Raw heart value |
%lifesteal_max% |
Server heart cap |
%lifesteal_rank% |
Player's position on the heart leaderboard |
%lifesteal_top_N_name% |
Name at position N on the leaderboard (cached) |
%lifesteal_top_N_hearts% |
Hearts at position N on the leaderboard |
%lifesteal_team% |
Player's team name (or "None") |
%lifesteal_eliminated% |
Whether the player is eliminated |
%lifesteal_bounty% |
Player's current bounty amount |
%lifesteal_hud% |
Player's HUD enabled state |
%lifesteal_withdraws_left% |
Withdrawals remaining today |
%lifesteal_withdraw_cooldown% |
Seconds until next withdraw is allowed |
%lifesteal_bar% |
Visual heart bar |
Installation
- Drop
LifeForge-1.0.0.jar into your server's plugins/ folder
- (Optional) Install Vault + an economy plugin to enable bounties
- (Optional) Install PlaceholderAPI to enable placeholders in scoreboards, tab, etc.
Storage
LifeForge ships with SQLite and requires no database setup — the pooled, async storage creates plugins/LifeForge/data.db on first boot. For networks or high-traffic servers, switch storage.type to MYSQL in config.yml (HikariCP connection pool included). All data is UUID-based and stored asynchronously, so the main thread never blocks on I/O, and all pending writes are flushed cleanly on shutdown.
评论 0
登录后参与评分
还没有评论,来抢沙发吧