Skip to content

命令树总览

/hnattr (或 /hna, /hnattribute)

├─ diagnose [玩家]                          # 一键诊断:属性、Buff、装备问题
├─ info                                     # 查看已注册属性列表
├─ lookup [玩家]                            # 查看玩家最终属性值
├─ stats [玩家]                             # 打开属性面板(分组/来源/Buff/周期)
├─ inspect [玩家] [slot]                    # 查看物品解析结果、模板命中
├─ source [玩家] [source]                   # 查看来源分组
├─ trace [玩家] <属性ID>                    # 查看属性组成(哪些来源贡献了多少)

├─ buff                                     # Buff 管理
│  ├─ list [关键字]                            # 查看 Buff 模板注册表
│  ├─ apply [目标] <key> [time] [level]      # 手动施加 Buff(支持选择器)
│  ├─ remove [目标] <key>                   # 移除指定 Buff
│  └─ clear [目标]                          # 清空所有 Buff
├─ buffs [目标] [关键词]                    # 查看运行中的 Buff(支持搜索)

├─ periodic                                 # 周期效果(DOT/HOT)
│  ├─ list [玩家]                              # 查看玩家所有周期实例
│  ├─ inspect <key> [目标]                     # 查看单个实例详情
│  ├─ debug <detail|off> <key>                 # 切换周期实例 debug
│  └─ clearall [玩家]                          # 清空所有周期实例

├─ item                                     # 模板化道具
│  ├─ list [关键字]                            # 查看模板化道具注册表
│  └─ give [玩家] <templateKey> [amount]      # 发放模板道具

├─ runtime                                  # 运行时快照
│  ├─ status                                   # 查看运行时快照状态
│  ├─ show <玩家>                              # 查看玩家快照内容
│  ├─ flush <玩家>                             # 强制保存快照
│  └─ load <玩家>                              # 强制加载快照

├─ reload [cluster]                         # 重载配置(可选广播到集群)
├─ refresh <玩家> [cluster]                 # 刷新玩家装备(可选广播)

├─ debug                                    # 调试工具
│  ├─ status                                   # 查看当前 debug 状态
│  └─ <info|debug|trace|off|reset> [cluster]  # 切换 debug 级别

├─ sync                                     # 跨服同步
│  ├─ status                                   # 查看跨服同步状态
│  ├─ test                                     # 测试跨服连接
│  └─ reload                                   # 重载跨服配置

└─ perf                                     # 性能压测
   ├─ start [duration]                         # 开始压测
   ├─ stop                                     # 停止压测
   └─ report                                   # 查看压测报告

常用场景速查

🔍 装备没生效

bash
/hnattr diagnose              # 一键诊断
/hnattr inspect               # 查看物品解析
/hnattr lookup                # 查看最终属性
/hnattr stats                 # 打开属性面板
/hnattr trace <属性ID>        # 追踪属性来源

💪 Buff 问题排查

bash
/hnattr buff list             # 查看 Buff 模板
/hnattr buffs                 # 查看运行中的 Buff
/hnattr stats                 # 打开面板查看 Buff 状态
/hnattr trace <属性ID>        # 追踪 Buff 对属性的影响

🔥 DOT/HOT 问题排查

bash
/hnattr stats                 # 打开面板查看周期状态
/hnattr periodic list         # 查看所有周期实例
/hnattr periodic inspect <key>  # 查看实例详情
/hnattr periodic debug detail <key>  # 开启详细日志

🎁 模板道具测试

bash
/hnattr item list             # 查看模板列表
/hnattr item give <templateKey>  # 发放道具
/hnattr inspect               # 查看道具解析

🔄 配置重载

bash
/hnattr reload                # 重载配置
/hnattr reload cluster        # 重载并广播到集群
/hnattr refresh <>        # 刷新玩家装备

批量操作示例

Buff 批量操作

bash
# 给所有玩家加 Buff
/hnattr buff apply @a 力量提升 600 1

# 给所有玩家加治疗
/hnattr buff apply @e[type=player] 治疗 300 1

# 清理所有玩家的 Buff
/hnattr buff clear @a

# 搜索特定 Buff
/hnattr buffs Steve 力量
/hnattr buffs Steve speed

什么时候需要 reload

修改以下配置文件后需要执行 /hnattr reload

  • config.yml
  • read-patterns.yml
  • attributes/*.yml
  • buffs/*.yml
  • periodic/settings.yml
  • periodic/*.yml
  • damage_types/*.yml
  • stages/*.yml
  • pipelines/*.yml
  • display.yml
  • vanilla.yml
  • mythicmobs.yml
  • gui/attribute-stats.yml
  • items/tokens.yml
  • items/materials.yml

Debug 级别说明

级别说明
off关闭 debug
info基础信息(推荐日常使用)
debug详细信息(排查问题时使用)
trace完整追踪(性能影响较大,仅调试时使用)
reset重置为默认级别
bash
# 开启详细日志
/hnattr debug debug

# 开启并广播到集群
/hnattr debug debug cluster

# 关闭 debug
/hnattr debug off

权限节点

所有命令都需要 hnattribute.admin 权限。


命令别名

  • /hnattr = /hna = /hnattribute

所有子命令都支持这三个别名。

HN 系列插件文档