SkillTree
适用于生存服务器的轻量级 RPG 风格技能树。玩家消耗原版经验等级(和/或资源物品)来永久解锁和提升被动升级效果。所有数据均按玩家独立保存,重启后依然保留。
输入 /skills 可在箱子 GUI 中浏览技能树;点击可负担的节点即可解锁或提升该技能等级。
技能列表
| 技能 |
效果说明 |
默认等级数 |
| Swiftness (迅捷) |
永久提升移动速度 |
4 (+5% / +10% / +15% / +20%) |
| Efficient Mining (高效挖掘) |
加快方块挖掘速度(隐藏的加速状态效果) |
3 (加速 I / II / III) |
| Prospector (勘探者) |
无需锋利镐即可获得类似幸运附魔的额外矿石掉落 |
3 (幸运 I / II / III) |
| Cultivator (耕种者) |
收获成熟作物时获得额外产量 |
3 (+1 / +2 / +3 产出物) |
| Iron Stomach (铁胃) |
概率抵消饥饿值损失 |
3 (20% / 40% / 60%) |
| Vitality (活力) |
增加最大生命值 |
5 (每级 +2 HP,最高 +10) |
| Angler's Luck (渔夫之运) |
概率获得额外钓鱼收获 |
3 (15% / 30% / 50%) |
所有数值、等级数量和消耗成本均可在 config.yml 中配置。
命令
| 命令 |
描述 |
权限 |
/skills |
打开技能树 GUI |
skilltree.use (默认:所有人) |
/skills info |
列出已解锁的技能 |
skilltree.use |
/skills grant <player> <skill> <tier> |
设置在线玩家的技能等级 (0 = 移除) |
skilltree.admin |
/skills reset <player> |
清除某玩家的所有技能 |
skilltree.admin |
/skills reload |
重新加载 config.yml 并应用效果 |
skilltree.admin |
别名:/skill, /skilltree, /st。所有子命令和参数支持自动补全(技能名、在线玩家、有效等级)。
<skill> 参数接受以下配置键名:swiftness, efficient-mining, prospector, cultivator, iron-stomach, vitality, anglers-luck。
权限
| 权限 |
默认值 |
授予权限 |
skilltree.use |
true (所有人) |
打开 GUI、查看技能信息、购买技能 |
skilltree.admin |
op |
grant / reset / reload (隐含 skilltree.use) |
配置说明
config.yml(首次运行时创建)。主要选项:
currency.use-xp-levels (默认 true) - 等级消耗原版经验等级。
currency.use-items (默认 false) - 等级还需要消耗资源物品。在 item-cost 下按等级分别设置,格式为 MATERIAL:amount 列表(例如 DIAMOND:4)。如果两种货币模式同时开启,玩家需同时支付两者。
gui-title - 箱子 GUI 标题(支持 & 颜色代码)。
- 各技能单独配置:
enabled、max-tier、GUI slot、icon,以及一个 tiers: 映射表,其中每个等级设置 magnitude、xp-cost 和 item-cost。
prospector.resource-blocks - 有资格获得额外掉落的矿石列表(默认为煤/铁/铜/金/钻石/绿宝石/青金石/红石及其深板岩变体、下界合金块、下界石英、远古残骸)。
cultivator.crops - 作物列表(默认为小麦/胡萝卜/马铃薯/甜菜根/下界疣)。
编辑后运行 /skills reload 以应用更改,无需重启服务器。
数值含义说明
- Swiftness: 基础速度的倍率 (
0.15 = +15%)。
- Efficient Mining: 加速效果放大器 (
0 = 加速 I, 1 = 加速 II ...)。
- Prospector: 用于判定额外掉落的有效幸运等级。
- Cultivator: 额外掉落的产出物数量。
- Iron Stomach / Angler's Luck: 概率值,范围从
0.0 到 1.0。
- Vitality: 额外最大生命值,单位为半颗心 (
2 = 一颗心)。
数据持久化
玩家等级数据保存在 plugins/SkillTree/data/players.yml 中,以 UUID 为键。每次更改时写入,并在关闭服务器时保存;启动时加载。重启后数据不丢失。
兼容性
Paper / Spigot / Bukkit / Purpur,Minecraft 1.21.1-1.21.11。单个 jar 文件,基于 1.21.1 API 构建(Java 21,class 65),已在 Paper 1.21.11 上通过负载测试;无 Paper 专属类,无 NMS 依赖,无其他插件依赖。
已知限制 / 备注
- 未在真实客户端中进行玩法测试。 已通过捆绑的
plugin.yml 和 Java class 版本 65 验证编译无误;行为逻辑基于代码审查,而非游戏内实测。
- Efficient Mining 与信标。 Efficient Mining 实现为一种环境下的加速状态效果。附近提供加速效果的信标可能会覆盖或刷新该效果(原版机制会保留更高的放大器等级或刷新持续时间)。当玩家离开信标范围后,插件会在下一次加入/重生时恢复无限的加速效果;如果存在更强的插件/信标加速效果,则在其持续期间优先生效。这是堆叠单一药水效果类型的固有限制,此处仅做文档说明而非规避。
- Prospector 奖励仅为近似模拟。 它通过模拟对应幸运等级的镐子本应增加的额外物品来实现掉落;并不能完美复刻每种矿石的原版掉落表(例如红石/青晶石的计数范围),也不与其他修改矿石掉落的插件交互。红石矿的“点亮”状态与未点亮状态视为相同。
- 管理员目标仅限在线玩家。
/skills grant 和 /skills reset 仅对在线玩家生效(效果必须应用于实体)。离线玩家的修改需要直接编辑 players.yml 文件。
- 属性名称。 基于 1.21.1 的属性常量编译(
GENERIC_MOVEMENT_SPEED, GENERIC_MAX_HEALTH);这些属性在 1.21.1-1.21.11 版本中解析为相同的注册表属性。
原始概念来自 Reddit (r/Minecraft) 用户 u/ColdFire0415。由 BeansNToast 开发。
SkillTree
A lightweight RPG-style skill tree for survival servers. Players spend vanilla
XP levels (and/or resource items) to permanently unlock and level up passive
upgrades. Everything persists per-player across restarts.
Open /skills to browse the tree in a chest-GUI; click an affordable node to
unlock or level up that skill.
Skills
| Skill |
What it does |
Default tiers |
| Swiftness |
Permanent movement-speed boost |
4 (+5% / +10% / +15% / +20%) |
| Efficient Mining |
Mine blocks faster (ambient hidden Haste) |
3 (Haste I / II / III) |
| Prospector |
Fortune-style bonus ore drops without a Fortune pickaxe |
3 (Fortune I / II / III) |
| Cultivator |
Extra yield when harvesting mature crops |
3 (+1 / +2 / +3 produce) |
| Iron Stomach |
Chance to negate hunger loss |
3 (20% / 40% / 60%) |
| Vitality |
More maximum health |
5 (+2 HP per tier, up to +10) |
| Angler's Luck |
Chance for an extra fishing catch |
3 (15% / 30% / 50%) |
All magnitudes, tier counts, and costs are configurable in config.yml.
Commands
| Command |
Description |
Permission |
/skills |
Open the skill tree GUI |
skilltree.use (default: all) |
/skills info |
List your unlocked skills |
skilltree.use |
/skills grant <player> <skill> <tier> |
Set an online player's tier (0 = remove) |
skilltree.admin |
/skills reset <player> |
Clear all of a player's skills |
skilltree.admin |
/skills reload |
Reload config.yml and re-apply effects |
skilltree.admin |
Aliases: /skill, /skilltree, /st. All subcommands and arguments tab-complete
(skill names, online players, valid tiers).
<skill> accepts the config keys: swiftness, efficient-mining, prospector,
cultivator, iron-stomach, vitality, anglers-luck.
Permissions
| Permission |
Default |
Grants |
skilltree.use |
true (everyone) |
Open the GUI, view skill info, buy skills |
skilltree.admin |
op |
grant / reset / reload (implies skilltree.use) |
Configuration
config.yml (created on first run). Highlights:
currency.use-xp-levels (default true) - tiers cost vanilla XP levels.
currency.use-items (default false) - tiers also require resource items. Set
per tier under item-cost as a list of MATERIAL:amount (e.g. DIAMOND:4).
If both currency modes are on, the player pays both.
gui-title - the chest-GUI title (supports & colour codes).
- Per skill:
enabled, max-tier, GUI slot, icon, and a tiers: map where
each tier sets magnitude, xp-cost, and item-cost.
prospector.resource-blocks - the ore list eligible for bonus drops
(coal/iron/copper/gold/diamond/emerald/lapis/redstone + deepslate variants,
nether gold, nether quartz, ancient debris by default).
cultivator.crops - the crop list (wheat / carrots / potatoes / beetroots /
nether wart by default).
Run /skills reload after editing to apply changes without a restart.
Magnitude meanings
- Swiftness: fraction of base speed (
0.15 = +15%).
- Efficient Mining: Haste amplifier (
0 = Haste I, 1 = Haste II ...).
- Prospector: effective Fortune level for the bonus-drop roll.
- Cultivator: number of extra produce items dropped.
- Iron Stomach / Angler's Luck: chance from
0.0 to 1.0.
- Vitality: bonus max health in half-hearts (
2 = one heart).
Persistence
Per-player tiers are saved to plugins/SkillTree/data/players.yml, keyed by UUID.
Written on every change and on shutdown; loaded on startup. Survives restarts.
Compatibility
Paper / Spigot / Bukkit / Purpur, Minecraft 1.21.1-1.21.11. One jar, built
against the 1.21.1 API (Java 21, class 65), load-tested on Paper 1.21.11; no
Paper-only classes, no NMS, no dependencies.
Known gaps / notes
- Not playtested in a live client. Built and verified to compile cleanly with
the bundled
plugin.yml and Java class version 65; behaviour is from code
review, not in-game testing.
- Efficient Mining + beacons. Efficient Mining is implemented as an ambient
Haste effect. A nearby beacon providing Haste can overwrite or refresh the
effect (vanilla keeps the higher amplifier / refreshes duration). When the
player leaves the beacon range the plugin's infinite Haste is restored on the
next join/respawn; if a stronger plugin/beacon Haste is active it takes
precedence while it lasts. This is an inherent limitation of stacking a single
potion-effect type and is documented rather than worked around.
- Prospector bonus is an approximation. It mimics a Fortune distribution by
dropping the extra items a Fortune pick of the rolled level would have added; it
does not perfectly replicate every per-ore vanilla loot table (e.g. redstone /
lapis count ranges), and it does not interact with other plugins that also
modify ore drops. Redstone-ore "lit" state is treated the same as unlit.
- Online-only admin targets.
/skills grant and /skills reset operate on
online players (effects must be applied to a live entity). Offline edits would
require editing players.yml directly.
- Attribute names. Compiled against the 1.21.1 attribute constants
(
GENERIC_MOVEMENT_SPEED, GENERIC_MAX_HEALTH); these resolve to the same
registry attributes on 1.21.1-1.21.11.
Original concept by u/ColdFire0415 on Reddit (r/Minecraft). Built by BeansNToast.
评论 0
登录后参与评分
还没有评论,来抢沙发吧