EzSkills - 适用于任何插件的技能成长系统
EzSkills 是一款轻量级的 RPG 成长插件,在服务器玩法之上叠加了等级、经验获取和限时能力机制。可独立使用,也可与 EzTree、EzMine 或您自己的自定义插件集成,将重复性操作转化为具有回报感的技能循环。
功能特性
五种内置技能
| 技能 |
描述 |
| Woodcutting |
砍伐树木时奖励经验值 |
| Mining |
挖掘矿石和石头时奖励经验值 |
| Fishing |
钓鱼时奖励经验值 |
| Fighting |
与怪物或玩家战斗时奖励经验值 |
| Acrobatics |
跳跃、坠落和疾跑时奖励经验值 |
所有调用 EzSkillsAPI.addExperience(plugin, ...) 的源插件均受您在中心配置中设置的“单插件经验倍率”和启用标志约束——无需修改第三方插件代码。
限时能力
- Tree Feller:内置的 Woodcutting 能力。玩家准备、触发并经历一个自动过期的批量砍伐窗口。
- Custom abilities (2.0 新增):任何插件均可通过
EzSkillsAPI.registerAbility(definition) 注册其专属能力。自定义能力会自动出现在 /abilities GUI 中。
- Ability state GUI (2.0 新增):
/abilities 命令会打开一个概览界面,显示每个已注册能力的当前状态:Ready(绿色)、Preparing(黄色)或 Active(金色)。
成长控制
- Scaling XP curve:在
skills.yml 中为每项技能调整 xp-base 和 xp-multiplier。
- Per-plugin overrides (2.0 新增):在
config.yml 中,可为任何第三方插件和任意技能设置 xp-multiplier 或 enabled: false,而无需触碰其代码。
存储
- YAML:零配置平面文件,适合小型服务器。
- MySQL:生产环境推荐;支持通过
/ezskills top 实现完整排行榜。
核心玩法循环
- Configure:在
skills.yml 中配置经验曲线,在 abilities.yml 中配置能力时机。
- Earn XP:玩家执行动作时获得经验值——即您的集成插件报告的任何事件。
- Level up:立即触发
SkillLevelUpEvent,用于发放奖励、解锁排名或 Boss 栏公告。
- Prepare and activate:在预热窗口内准备并激活能力,以使用强大的限时效果。
- View progress:随时通过
/skills(查看等级)和 /abilities(查看能力状态)查看进度。
命令
玩家命令
| 命令 |
描述 |
权限 |
/skills |
打开技能进度概览 GUI |
ezskills.use |
/abilities |
打开能力状态概览 GUI |
ezskills.use |
管理员命令 (/ezskills)
| 命令 |
描述 |
get <player> <skill> |
打印玩家的等级和已储存的经验值 |
info <player> |
打印完整的技能概览(支持离线查询) |
addxp <player> <skill> <amount> |
手动授予经验值;会触发升级事件 |
setlevel <player> <skill> <level> |
直接设置等级,重置经验值 |
reset <player> <skill> |
将某项技能重置为 1 级 |
resetall <player> |
将所有技能重置为 1 级 |
top <skill> [limit] |
按等级生成排行榜(需 MySQL 才能获取完整结果) |
ability <player> <ability> |
强制激活能力,跳过准备阶段 |
reload |
重新加载所有配置文件 |
所有 /ezskills 子命令均需 ezskills.admin 权限。
配置
| 文件 |
控制内容 |
config.yml |
GUI 标题、Boss 栏通知、plugin-overrides |
skills.yml |
每项技能的 XP 基数和倍率 |
abilities.yml |
每种能力的准备窗口、持续时间和冷却时间 |
storage.yml |
存储后端(YAML 或 MySQL)及连接详情 |
单插件经验覆盖 (2.0 新增)
# config.yml
plugin-overrides:
MyPlugin: # 必须与插件确切名称匹配
woodcutting:
enabled: true
xp-multiplier: 1.5 # 来自 MyPlugin 的 Woodcutting 经验值 +50%
mining:
enabled: false # MyPlugin 无法提供 Mining 经验值
API 参考
Skills
| 方法 |
描述 |
EzSkillsAPI.addExperience(playerId, skill, amount) |
直接授予经验值(不应用倍率) |
EzSkillsAPI.addExperience(plugin, playerId, skill, amount) |
根据服务器配置的倍率和启用检查授予经验值 |
EzSkillsAPI.getSkillLevel(playerId, skill) |
返回玩家当前等级 |
EzSkillsAPI.getSkillExperience(playerId, skill) |
返回玩家累计经验值 |
EzSkillsAPI.setSkillLevel(playerId, skill, level) |
直接设置等级,重置经验值 |
EzSkillsAPI.getSkillProfile(playerId) |
返回完整档案对象(若未缓存则返回 null) |
Skills
| 方法 |
描述 |
EzSkillsAPI.registerSkill(definition) |
在运行时注册自定义技能;进度会自动持久化 |
EzSkillsAPI.getRegisteredSkills() |
列出所有已注册的自定义技能定义 |
Abilities
| 方法 |
描述 |
EzSkillsAPI.registerAbility(definition) |
注册自定义能力;自动出现在 /abilities 命令中 |
EzSkillsAPI.getRegisteredAbilities() |
列出所有已注册的能力定义 |
EzSkillsAPI.prepareAbility(playerId, ability) |
进入准备(蓄力)状态 |
EzSkillsAPI.activateAbility(playerId, ability) |
立即激活能力 |
EzSkillsAPI.deactivateAbility(playerId, ability) |
提前取消或结束能力 |
EzSkillsAPI.isAbilityActive(playerId, ability) |
检查能力当前是否处于激活状态。 |
事件
SkillLevelUpEvent - 当玩家达到新等级时触发(携带旧等级和新等级信息)。
EzSkillsAbilityPrepareEvent - 当能力进入预热窗口时触发。
EzSkillsAbilityActivateEvent - 当能力被激活时触发。
EzSkillsAbilityDeactivateEvent - 当能力结束或被取消时触发。
注册自定义能力
public class NightVisionAbility implements AbilityDefinition {
@Override public String getName() { return "NIGHT_VISION"; }
@Override public String getDisplayName() { return "Night Vision"; }
@Override public Material getIcon() { return Material.ENDER_EYE; } // 可选 - 默认为 NETHER_STAR
@Override public String getDescription() { return "See clearly in the dark."; }
@Override public String getSkillName() { return "FIGHTING"; }
// 可选:覆盖默认计时器(30秒准备 / 15秒激活 / 120秒冷却)
}
// 在 onEnable 中:
EzSkillsAPI.registerAbility(new NightVisionAbility());
请参阅 开发者文档 获取完整的集成指南。
兼容性
- Minecraft: 1.21 和 26.1+
- 服务端软件: Bukkit、Spigot 或 Paper
- Java: 25+
- 可选: EzCountdown 用于首领栏升级通知
需要帮助?
请在论坛帖子中留言,或 加入我们的 Discord 服务器 以获取快速支持和集成建议。
EzSkills - Skill progression for any plugin
EzSkills is a compact RPG progression plugin that layers levelling, XP gain, and timed abilities on top of your server's gameplay. Use it standalone or integrate with plugins like EzTree, EzMine, or your own custom plugins to turn repetitive actions into a rewarding skill loop.
Features
Five built-in skills
| Skill |
Description |
| Woodcutting |
Award XP for felling trees |
| Mining |
Award XP for breaking ores and stone |
| Fishing |
Award XP for catching fish |
| Fighting |
Award XP for combat with mobs and players |
| Acrobatics |
Award XP for jumping, falling, and sprinting |
Every source plugin that calls EzSkillsAPI.addExperience(plugin, ...) is subject to the per-plugin XP multiplier and enabled flag you configure centrally - no changes needed in third-party plugins.
Timed abilities
- Tree Feller: the built-in Woodcutting ability. Players prepare, trigger and ride out an auto-expiring mass-fell window.
- Custom abilities (new in 2.0): any plugin can register its own ability via
EzSkillsAPI.registerAbility(definition). Custom abilities appear in the /abilities GUI automatically.
- Ability state GUI (new in 2.0): the
/abilities command opens an overview showing every registered ability with its current state: Ready (green), Preparing (yellow), or Active (gold).
Progression controls
- Scaling XP curve: tune
xp-base and xp-multiplier per skill in skills.yml.
- Per-plugin overrides (new in 2.0): in
config.yml, set an xp-multiplier or enabled: false for any third-party plugin and any skill without touching their code.
Storage
- YAML: zero-setup flat file, ideal for small servers.
- MySQL: recommended for production; enables full leaderboards via
/ezskills top.
Core gameplay loop
- Configure XP curves in
skills.yml and ability timings in abilities.yml.
- Earn XP as players perform actions - any event your integration plugin reports.
- Level up:
SkillLevelUpEvent fires immediately for rewards, rank unlocks, or boss-bar announcements.
- Prepare and activate an ability within its warm-up window to use a powerful timed effect.
- View progress at any time with
/skills (levels) and /abilities (ability states).
Commands
Player commands
| Command |
Description |
Permission |
/skills |
Open the skill progress overview GUI |
ezskills.use |
/abilities |
Open the ability state overview GUI |
ezskills.use |
Admin commands (/ezskills)
| Command |
Description |
get <player> <skill> |
Print a player's level and stored XP |
info <player> |
Print a full skill overview (works offline) |
addxp <player> <skill> <amount> |
Grant XP manually; fires level-up events |
setlevel <player> <skill> <level> |
Set a level directly, resetting XP |
reset <player> <skill> |
Reset one skill to level 1 |
resetall <player> |
Reset all skills to level 1 |
top <skill> [limit] |
Leaderboard by level (MySQL required for full results) |
ability <player> <ability> |
Force-activate an ability, bypassing preparation |
reload |
Reload all config files |
All /ezskills subcommands require the ezskills.admin permission.
Configuration
| File |
Controls |
config.yml |
GUI titles, boss-bar notifications, plugin-overrides |
skills.yml |
XP base and multiplier per skill |
abilities.yml |
Preparation window, active duration, and cooldown per ability |
storage.yml |
Storage backend (YAML or MySQL) and connection details |
Per-plugin XP overrides (new in 2.0)
# config.yml
plugin-overrides:
MyPlugin: # must match the exact plugin name
woodcutting:
enabled: true
xp-multiplier: 1.5 # 50% bonus Woodcutting XP from MyPlugin
mining:
enabled: false # MyPlugin cannot award Mining XP
API reference
Skills
| Method |
Description |
EzSkillsAPI.addExperience(playerId, skill, amount) |
Award XP directly (no multiplier applied) |
EzSkillsAPI.addExperience(plugin, playerId, skill, amount) |
Award XP with the server-configured multiplier and enabled check |
EzSkillsAPI.getSkillLevel(playerId, skill) |
Return the player's current level |
EzSkillsAPI.getSkillExperience(playerId, skill) |
Return the player's accumulated XP |
EzSkillsAPI.setSkillLevel(playerId, skill, level) |
Set a level directly, resetting XP |
EzSkillsAPI.getSkillProfile(playerId) |
Return the full profile object (null if not cached) |
Skills
| Method |
Description |
EzSkillsAPI.registerSkill(definition) |
Register a custom skill at runtime; progress is persisted automatically |
EzSkillsAPI.getRegisteredSkills() |
List all registered custom skill definitions |
Abilities
| Method |
Description |
EzSkillsAPI.registerAbility(definition) |
Register a custom ability; appears in /abilities automatically |
EzSkillsAPI.getRegisteredAbilities() |
List all registered ability definitions |
EzSkillsAPI.prepareAbility(playerId, ability) |
Enter the preparation (charged) state |
EzSkillsAPI.activateAbility(playerId, ability) |
Activate the ability immediately |
EzSkillsAPI.deactivateAbility(playerId, ability) |
Cancel or end the ability early |
EzSkillsAPI.isAbilityActive(playerId, ability) |
Check whether the ability is currently active. |
Events
SkillLevelUpEvent - fires when a player reaches a new level (carries old and new level).
EzSkillsAbilityPrepareEvent - fires when an ability enters its warm-up window.
EzSkillsAbilityActivateEvent - fires when an ability activates.
EzSkillsAbilityDeactivateEvent - fires when an ability ends or is cancelled.
Registering a custom ability
public class NightVisionAbility implements AbilityDefinition {
@Override public String getName() { return "NIGHT_VISION"; }
@Override public String getDisplayName() { return "Night Vision"; }
@Override public Material getIcon() { return Material.ENDER_EYE; } // optional - defaults to NETHER_STAR
@Override public String getDescription() { return "See clearly in the dark."; }
@Override public String getSkillName() { return "FIGHTING"; }
// Optional: override timing defaults (30s prep / 15s active / 120s cooldown)
}
// In onEnable:
EzSkillsAPI.registerAbility(new NightVisionAbility());
See the developer documentation for the full integration guide.
Compatibility
- Minecraft: 1.21 and 26.1+
- Server software: Bukkit, Spigot, or Paper
- Java: 25+
- Optional: EzCountdown for boss-bar level-up notifications
Need help?
Drop a message on the forum thread or join our Discord server for quick support and integration tips.
评论 0
登录后参与评分
还没有评论,来抢沙发吧