EmakiSkills 总览
EmakiSkills 是一套技能系统,同时支持主动技能和被动技能。主动技能由玩家通过装备解锁,绑定到槽位和触发器上,进入施法模式后按对应按键释放。被动技能由游戏事件(攻击、受伤、击杀等)自动触发,不需要施法模式和槽位绑定。技能效果本身由 MythicMobs 负责,EmakiSkills 管的是"什么时候能放、怎么触发、消耗什么资源"这些事。
基本信息
| 属性 | 值 |
|---|---|
| 版本 | 1.0.0 |
| artifactId | emaki-skills |
| 主类 | emaki.jiuwu.craft.skills.EmakiSkillsPlugin |
| 根命令 | /emakiskills |
| 别名 | /eskills |
| 强依赖 | EmakiCoreLib |
| 软依赖 | MythicMobs, EmakiAttribute, PlaceholderAPI |
信息
EmakiSkills 为闭源模块,通过 private-modules profile 纳入构建。
注意
EmakiSkills 只是技能管理层,技能的实际效果(伤害、粒子、范围等)由 MythicMobs 配置决定。没有 MythicMobs 时 Skills 仍可启动,但释放技能会失败。
它做了什么
- 从装备的 PDC 和 Lore 中扫描玩家已解锁的技能,装备变化时自动更新
- 维护每个玩家的技能槽位、触发器绑定,数据存储在 YAML 档案中
- 管理施法模式(Cast Mode)的开关,以及 ActionBar 上的技能槽位显示
- 主动技能:施法时依次检查冷却、强制延迟、资源消耗,全部通过后调用 MythicMobs 释放
- 被动技能:监听游戏事件(攻击、受伤、击杀、射箭等 22 种),自动触发已解锁的被动技能
- 通过
MythicBridge调用 MythicMobs API 执行技能释放,被动技能会传递事件目标信息 - 通过
EaBridge读取 EmakiAttribute 的资源和属性数据,用于施法前的消耗检查
config.yml 完整格式
yaml
# 配置文件版本
config_version: "1.0.0"
# 语言文件标识
language: zh_CN
# 是否在首次启动时释放默认资源
release_default_data: true
# ============================================================
# 槽位配置 (Slots)
# ============================================================
slots:
# 每个玩家的默认技能槽位数量
default_count: 3
# ============================================================
# 施法模式配置 (Cast Mode)
# ============================================================
cast_mode:
# F 键用于进入/退出施法模式。
# G 键为客户端本地按键,Spigot 服务端无法监听,ProtocolLib/PacketEvents 也无法获取。
entry_key: "f"
# 玩家重新加入时是否恢复上次的施法模式状态
restore_last_state_on_join: true
# ============================================================
# 施法时序配置 (Cast Timing)
# ============================================================
cast_timing:
# 强制全局施法延迟(tick),两次施法之间的最小间隔
# 0 = 无强制延迟
forced_global_cast_delay_ticks: 0
# ============================================================
# ActionBar 配置
# ============================================================
actionbar:
# 是否启用 ActionBar 显示
enabled: true
# 刷新间隔(tick)
refresh_interval_ticks: 10
# 施法模式下的 ActionBar 模板
# 可用变量:{slot_1} ~ {slot_N}, {slot_display}, {forced_delay}
template_cast_mode: "&aCast Mode &7| {slot_display}"
# 非施法模式下的 ActionBar 模板
template_idle: "&7Idle"
# ============================================================
# 触发器配置 (Triggers)
# 定义所有 15 种触发器的显示名称、启用状态和冲突规则
# ============================================================
triggers:
left_click:
display_name: "[左键]"
enabled: true
incompatible_with:
- "shift_left_click"
right_click:
display_name: "[右键]"
enabled: true
incompatible_with:
- "shift_right_click"
shift_left_click:
display_name: "[Shift + 左键]"
enabled: true
incompatible_with:
- "left_click"
shift_right_click:
display_name: "[Shift + 右键]"
enabled: true
incompatible_with:
- "right_click"
drop_q:
display_name: "[Q 键]"
enabled: true
incompatible_with: []
hotbar_1:
display_name: "[数字键 1]"
enabled: true
incompatible_with: []
hotbar_2:
display_name: "[数字键 2]"
enabled: true
incompatible_with: []
hotbar_3:
display_name: "[数字键 3]"
enabled: true
incompatible_with: []
hotbar_4:
display_name: "[数字键 4]"
enabled: true
incompatible_with: []
hotbar_5:
display_name: "[数字键 5]"
enabled: true
incompatible_with: []
hotbar_6:
display_name: "[数字键 6]"
enabled: true
incompatible_with: []
hotbar_7:
display_name: "[数字键 7]"
enabled: true
incompatible_with: []
hotbar_8:
display_name: "[数字键 8]"
enabled: true
incompatible_with: []
hotbar_9:
display_name: "[数字键 9]"
enabled: true
incompatible_with: []
# ============================================================
# 被动触发器设置 (Passive Trigger Settings)
# ============================================================
passive_trigger_settings:
# timer 被动触发器的检查间隔(tick)
timer_interval_ticks: 20
# ============================================================
# 被动触发器配置 (Passive Triggers)
# 这些触发器由技能定义中的 passive_triggers 字段声明,玩家不能在 GUI 中修改
# ============================================================
passive_triggers:
attack:
display_name: "[攻击命中]"
enabled: true
incompatible_with: []
damaged:
display_name: "[受到伤害]"
enabled: true
incompatible_with: []
damaged_by_entity:
display_name: "[被实体伤害]"
enabled: true
incompatible_with: []
death:
display_name: "[死亡]"
enabled: true
incompatible_with: []
kill_entity:
display_name: "[击杀实体]"
enabled: true
incompatible_with: []
kill_player:
display_name: "[击杀玩家]"
enabled: true
incompatible_with: []
shoot_bow:
display_name: "[射出弓箭]"
enabled: true
incompatible_with: []
arrow_hit:
display_name: "[箭矢命中实体]"
enabled: true
incompatible_with: []
arrow_land:
display_name: "[箭矢落地]"
enabled: true
incompatible_with: []
shoot_trident:
display_name: "[掷出三叉戟]"
enabled: true
incompatible_with: []
trident_hit:
display_name: "[三叉戟命中实体]"
enabled: true
incompatible_with: []
trident_land:
display_name: "[三叉戟落地]"
enabled: true
incompatible_with: []
break_block:
display_name: "[破坏方块]"
enabled: true
incompatible_with: []
place_block:
display_name: "[放置方块]"
enabled: true
incompatible_with: []
drop_item:
display_name: "[丢弃物品]"
enabled: true
incompatible_with: []
shift_drop_item:
display_name: "[Shift + 丢弃物品]"
enabled: true
incompatible_with: []
swap_items:
display_name: "[交换主副手]"
enabled: true
incompatible_with: []
shift_swap_items:
display_name: "[Shift + 交换主副手]"
enabled: true
incompatible_with: []
login:
display_name: "[登录]"
enabled: true
incompatible_with: []
sneak:
display_name: "[潜行]"
enabled: true
incompatible_with: []
teleport:
display_name: "[传送]"
enabled: true
incompatible_with: []
timer:
display_name: "[定时]"
enabled: true
incompatible_with: []提示
incompatible_with 定义触发器之间的冲突关系。比如 left_click 和 shift_left_click 互斥——因为在 Bukkit 中,Shift+左键事件会同时触发左键事件,如果两个都绑了技能就会产生歧义。选择触发器时,与已选触发器冲突的选项会自动禁用。
默认资源目录
| 文件/目录 | 说明 |
|---|---|
config.yml | 主配置 |
skills/ | 技能定义(默认 1 个) |
resources/ | 本地资源定义 |
gui/ | GUI 配置 |
lang/ | 语言文件 |
data/ | 运行时玩家数据 |
默认内容
| 内容类型 | 数量 |
|---|---|
| 技能定义 | 2(1 主动 + 1 被动) |