NexusCore — 生存服务器的 RPG 框架
将任何生存或 SMP 服务器转变为功能齐全的 RPG —— 无需替换任何原版机制。
NexusCore 是一个轻量级、模块化的 RPG 框架,适用于 Paper 1.21+。它为插件提供了基础支持:持久化的属性系统、技能引擎、职业框架以及简洁的公共 API。只需安装一次 NexusCore,即可根据需要叠加任意数量的附加插件(addon)。
特性
玩家属性
每位玩家都拥有一套完整的 RPG 属性,并在会话之间保持持久化:
- 等级与经验值 — 二次方经验值曲线,可针对每个等级配置奖励加成
- 生命值与法力值 — 与 Bukkit 的生命值条完全同步
- 攻击力、防御力、耐力 — 已准备好供附加插件调用
- 未分配的属性点 — 可通过
/nexus spend 自由分配
职业系统
内置三种具有独特属性倍率的职业 —— 更多职业可通过附加插件添加:
| 职业 |
生命值 |
法力值 |
攻击力 |
防御力 |
| Warrior |
×1.4 |
×0.6 |
×1.3 |
×1.5 |
| Mage |
×0.8 |
×1.8 |
×1.2 |
×0.7 |
| Archer |
×1.0 |
×1.0 |
×1.4 |
×0.9 |
技能引擎
具备完整技能注册表,支持冷却时间追踪和法力消耗。附加插件可通过一行代码注册其专属的主动技能和被动技能。玩家通过附加插件定义的触发条件(物品、快捷键等)激活技能。
存储方式
可选择 YAML(零配置)或 MySQL(推荐用于大型服务器)。仅需在 config.yml 中修改一行即可切换。MySQL 保存操作为异步执行,以确保你的 TPS 不受影响。
动作栏
在每个玩家的快捷栏上方实时显示生命值和法力值条 —— 始终同步,无需额外配置。
PlaceholderAPI 支持
提供 14 个占位符,可用于计分板、标签页列表和全息显示:
%nexuscore_level% · %nexuscore_class_name% · %nexuscore_hp% · %nexuscore_mana% 等。
面向附加插件开发者
NexusCore 提供了清晰的公共 API。只需几行代码即可注册技能、职业并监听 RPG 事件:
NexusCoreAPI api = NexusCore.getInstance().getAPI();
// 注册自定义技能
api.registerSkill(new FireballSkill());
// 注册自定义职业
api.registerClass(new RPGClass("PALADIN", "Paladin", 1.3, 1.2, 1.0, 1.4, "Holy warrior."));
// 给予玩家经验值
api.giveExperience(player, 500);
自定义事件:NexusLevelUpEvent, NexusClassChangeEvent
工具类:ChatUtil, ItemBuilder
完整的附加插件文档包含在下载包中。
命令
| 命令 |
描述 |
/nexus stats [player] |
查看 RPG 属性 |
/nexus spend |
分配属性点 |
/nexus setclass |
设置你的职业 |
/nexus classes |
列出所有职业 |
/nexus skills |
列出已注册的技能 |
/nexus givexp |
给予经验值 (管理员) |
/nexus reset [player] |
重置 RPG 数据 (管理员) |
/nexus reload |
重载配置文件 (管理员) |
我的附加插件
要求
NexusCore 是一个开发者框架 —— 它本身不添加任何游戏玩法。游戏玩法来自依赖它的附加插件。
NexusCore — RPG Framework for Survival Servers
Turn any Survival or SMP server into a fully-featured RPG — without replacing a single vanilla mechanic.
NexusCore is a lightweight, modular RPG framework for Paper 1.21+. It provides the foundation that addon plugins build on: a persistent stat system, skill engine, class framework, and a clean public API. Install NexusCore once, then layer as many addons as you like.
Features
Player Stats
Every player has a full set of RPG stats that persist across sessions:
- Level & XP — quadratic XP curve, configurable per-level bonuses
- HP & Mana — fully synced with Bukkit's health bar
- Attack Power, Defense, Stamina — ready for addons to use
- Unspent Stat Points — distribute freely with
/nexus spend
Class System
Three built-in classes with unique stat multipliers — more via addons:
| Class |
HP |
Mana |
Attack |
Defense |
| Warrior |
×1.4 |
×0.6 |
×1.3 |
×1.5 |
| Mage |
×0.8 |
×1.8 |
×1.2 |
×0.7 |
| Archer |
×1.0 |
×1.0 |
×1.4 |
×0.9 |
Skill Engine
A full skill registry with cooldown tracking and mana costs. Addons register their own active and passive skills in one line. Players activate skills through addon-defined triggers (items, keybinds, etc.).
Storage
Choose between YAML (zero setup) or MySQL (recommended for larger servers). Switch with one line in config.yml. MySQL saves run async to keep your TPS clean.
Action Bar
A live HP and mana bar shown to every player above the hotbar — always in sync, no config needed.
PlaceholderAPI Support
14 placeholders available for scoreboards, tab lists, and holograms:
%nexuscore_level% · %nexuscore_class_name% · %nexuscore_hp% · %nexuscore_mana% · and more.
For Addon Developers
NexusCore exposes a clean public API. Register skills, classes, and listen to RPG events in a few lines of code:
NexusCoreAPI api = NexusCore.getInstance().getAPI();
// Register a custom skill
api.registerSkill(new FireballSkill());
// Register a custom class
api.registerClass(new RPGClass("PALADIN", "Paladin", 1.3, 1.2, 1.0, 1.4, "Holy warrior."));
// Give XP to a player
api.giveExperience(player, 500);
Custom events: NexusLevelUpEvent, NexusClassChangeEvent
Utility classes: ChatUtil, ItemBuilder
Full addon documentation is included in the download.
Commands
| Command |
Description |
/nexus stats [player] |
View RPG stats |
/nexus spend |
Spend a stat point |
/nexus setclass |
Set your class |
/nexus classes |
List all classes |
/nexus skills |
List registered skills |
/nexus givexp |
Give XP (admin) |
/nexus reset [player] |
Reset RPG data (admin) |
/nexus reload |
Reload config (admin) |
My Addons
Requirements
NexusCore is a developer framework — it adds no gameplay by itself. Gameplay comes from addons that depend on it.
评论 0
登录后参与评分
还没有评论,来抢沙发吧