NexusClasses — 职业选择与切换(适用于 NexusCore)
让每位玩家加入时即拥有职业 —— 配备精美 GUI、可配置的切换成本以及完整的管理员权限。
NexusClasses 是 NexusCore 的第一个官方插件。它在 NexusCore 的职业框架之上,添加了一套完整的职业选择与切换系统 —— 没有配置噩梦,也没有冗余代码。
需要安装 NexusCore 才能运行。
工作原理
首次加入
当一名没有职业的玩家首次加入服务器时,他们会被立即冻结 —— 无法移动、受到伤害、造成伤害、打开背包或与任何事物交互。在短暂延迟后(可配置),GUI 会自动打开,并在玩家做出选择前一直保持开启状态。无处可逃。
职业选择 GUI
一个简洁的库存 GUI 会显示所有可用的职业(包括其他 NexusCore 插件注册的任何职业)及其属性和描述。只需点击一次即可完成选择。玩家解锁后即可开始游戏。
切换职业
已经拥有职业的玩家可以使用 /class switch 打开切换 GUI。切换需要消耗物品 —— 默认为 5 颗钻石,每种材料和数量均可单独配置。管理员可以通过 GUI 或直接通过命令免费切换职业。
功能特性
- 用于职业选择的库存 GUI,支持属性预览
- 首次加入时自动弹出 GUI —— 玩家在做出选择前完全被锁定
- 无职业状态下禁止移动、受伤或交互
- 可配置切换职业所需的物品成本(材料 + 数量)
- 管理员可通过权限或直接命令免费切换职业
- 兼容其他 NexusCore 插件注册的任何职业 —— 并非硬编码为战士/法师/弓箭手
- 管理员使用
/class switch —— 无需 GUI,瞬间切换
- 使用
/class list 查看所有可用职业
- 所有命令均支持 Tab 补全
命令
| 命令 |
描述 |
/class info |
显示你当前的职业及属性 |
/class select |
打开职业选择 GUI(仅限首次) |
/class switch |
打开职业切换 GUI(需消耗物品) |
/class switch |
瞬间切换,无需花费 (管理员) |
/class list |
列出所有可用职业 |
权限
| 权限节点 |
默认设置 |
描述 |
nexusclasses.use |
所有人 |
使用 /class 相关命令 |
nexusclasses.admin |
OP |
免费切换职业,绕过成本限制 |
配置文件
class-switch-cost:
enabled: true
material: DIAMOND # 任何有效的 Bukkit 材质
amount: 5
no-class-message: "&c你必须先选择一个职业才能开始游戏!"
gui-open-delay-ticks: 40 # 20 ticks = 1 秒
要求
NexusClasses — Class Selection & Switching for NexusCore
Give every player a class from the moment they join — with a beautiful GUI, a configurable switch cost, and full admin control.
NexusClasses is the first official addon for NexusCore. It adds a complete class selection and switching system on top of NexusCore's class framework — no config nightmare, no bloat.
Requires NexusCore to be installed on the server.
How it works
First join
When a player joins for the first time without a class, they are immediately frozen — they cannot move, take damage, deal damage, open their inventory, or interact with anything. A GUI opens automatically after a short delay (configurable) and stays open until they make a choice. There's no escaping it.
Class selection GUI
A clean inventory GUI shows all available classes (including any registered by other NexusCore addons) with their stats and description. One click — done. The player is unlocked and ready to play.
Switching classes
Players who already have a class can use /class switch to open the switch GUI. Switching costs items — by default 5 Diamonds, fully configurable per material and amount. Admins can switch for free, either through the GUI or directly via /class switch .
Features
- Inventory GUI for class selection with stat previews
- Automatic GUI on first join — player is fully locked until they choose
- No movement, no damage, no interactions while classless
- Configurable item cost to switch classes (material + amount)
- Free switching for admins via permission or direct command
- Works with any class registered by other NexusCore addons — not hardcoded to Warrior/Mage/Archer
/class switch for admins — no GUI, instant switch
/class list to see all available classes
- Tab-completion for all commands
Commands
| Command |
Description |
/class info |
Show your current class and stats |
/class select |
Open class selection GUI (first time only) |
/class switch |
Open class switch GUI (costs items) |
/class switch |
Switch instantly, no cost (admin) |
/class list |
List all available classes |
Permissions
| Permission |
Default |
Description |
nexusclasses.use |
everyone |
Use /class commands |
nexusclasses.admin |
op |
Free class switching, bypass cost |
Configuration
class-switch-cost:
enabled: true
material: DIAMOND # Any valid Bukkit material
amount: 5
no-class-message: "&cYou must choose a class before playing!"
gui-open-delay-ticks: 40 # 20 ticks = 1 second
Requirements
评论 0
登录后参与评分
还没有评论,来抢沙发吧