Kilacraft-AI
首款为每个服务器提供 AI 代理的插件,该代理会随着使用次数的增加而更懂你——由 LLM 意图识别和技能执行框架驱动。
版本兼容性
最低要求:Minecraft 1.16.5 + Java 17
| Minecraft 版本 |
Java 要求 |
支持的服务器端 |
| 1.16.5 |
Java 17+ |
Paper / Purpur / Leaf / Folia |
| 1.17 - 1.19 |
Java 17+ |
所有 |
| 1.20 - 1.21+ |
Java 21+ |
所有 |
一个 JAR 文件兼容所有版本。基于 Spigot 1.16.5 API 开发,完全支持 Folia 区域线程调度。
可选依赖项
| 插件 |
版本 |
功能 |
| CMI |
9.8.6.4+ |
传送、家园、锚点、增强玩家信息、TPA |
| GlobalMarketPlus |
1.3.8.0+ |
市场查询、余额、价格、商品列表 |
| MythicMobs |
5.12.0+ |
NPC 占位符(显示 AI 回复) |
| Vault |
最新版 |
多货币支持 |
| Spark |
最新版 |
服务器性能采样与分析(Paper 1.21+ 等内置) |
当缺少相关插件时,对应功能会自动禁用。核心聊天功能不受影响。
快速开始
1. 安装
下载最新的 Kilacraft-AI.jar,将其放入服务器的 plugins/ 目录中,然后启动服务器。
2. 配置 API
编辑 plugins/Kilacraft-AI/llm.yml 以填入你的 LLM API 凭据:
llm:
api_url: "https://api.deepseek.com/v1/chat/completions"
api_key: "your-api-key"
model: "deepseek-chat"
支持所有 OpenAI 兼容提供商(DeepSeek、智谱 AI、Moonshot、OpenAI、Groq、SiliconFlow、Gemini、OpenRouter 等)。只需更改 api_url 和 model 即可切换。
3. 测试
/kila hello
如果你看到了 AI 回复,说明一切就绪。
使用 /kilacraft reload 重载配置,使用 /kilacraft knowledge reload 重载知识库,使用 /kilacraft personalities reload 重载人格。
核心功能
AI 智能聊天




三种交互模式:
# 命令模式
/kila How do I get diamonds?
# 连续聊天模式
/kilacraft chat
> I want to build a farm
> AI: Great idea! What crop do you want to plant?
# 关键词触发(公共聊天)
@ai How do I craft this?
命令别名:/kilacraft、/kila、/ai、/zm
流式输出与载体:
AI 回复以字符为单位实时逐字显示,无需等待。支持 5 种输出载体,可根据场景进行配置:
| 载体 |
效果 |
最佳用途 |
| SIDEBAR |
右侧边栏,不遮挡视野 |
长回复(推荐) |
| BOSS_BAR |
顶部标题栏 |
中等长度文本 |
| ACTION_BAR |
快捷栏上方 |
短通知 |
| CHAT |
聊天框 |
默认 |
| TITLE |
屏幕中心 |
简短高亮提示 |
AI 回复音效:
当 AI 开始回复时播放声音,仅触发该操作的玩家可听到。在 output.yml 中配置:
output:
sound:
enabled: true
sound_name: "ENTITY_PLAYER_LEVELUP"
volume: 0.5
pitch: 1.2
知识库增强
让 AI 了解你的服务器规则、玩法和常见问题解答。只需将 Markdown 或 TXT 文件放置在 plugins/Kilacraft-AI/knowledge/ 目录下:
# server_rules.md
## How to claim land?
Use the /claim command to define your territory. Costs at least 10 coins.
运行 /kilacraft knowledge reload 以加载。当玩家提问时,AI 会自动检索并引用相关内容。支持自定义词典以包含服务器特定术语,从而提高搜索准确性。



高级功能
玩家档案与社会关系
玩家档案: AI 会自动分析玩家的对话历史,并为每位玩家构建八维行为档案,在后续对话中动态注入档案摘要作为参考上下文。随着时间推移,AI 会越来越了解你的玩家。

| 维度 |
描述 |
示例 |
| 玩法风格 |
游戏偏好 |
战斗导向、探索者、建造者 |
| 性格特征 |
行为模式 |
友好、幽默、直接 |
| 兴趣领域 |
喜欢的内容和活动 |
经济与交易、红石、建筑 |
| 边界设定 |
不喜欢的内容或行为 |
不要叫我的名字、别催我 |
| 沟通方式 |
偏好的 AI 回复风格 |
简短直接、不使用表情符号 |
| 空间记忆 |
提及的地点和基地位置 |
主基地在沙漠 (1200,64,-800) |
| 已知事实 |
玩家明确陈述的事实 |
Steve 是朋友,家靠近沙漠神殿 |
| 特殊观察 |
AI 自由形式的观察 |
“该玩家最近表现出对附魔的兴趣” |
在玩家登录/登出时自动触发分析(三重门机制以防止浪费 API 调用)。配置位于 llm.yml:
agent:
profile:
enabled: true
min_interval_minutes: 30 # 最小分析间隔
min_message_delta: 20 # 最小新消息数量
社交关系: 自动追踪玩家之间的互动(私聊、TPA、技能交互),构建社交关系图谱。关系强度采用递减增量算法——不活跃的关系会随时间自然衰减。
- 好友的里程碑事件(击杀 Boss、完成突袭、宠物死亡等)会出现在彼此的登录问候中
- AI 能感知“谁和谁是朋友”,并在对话中自然地提及好友动态


登录问候
AI 会在玩家登录时自动发送个性化问候。基于玩家档案、离线事件和好友动态,每次问候都是独一无二的。
首次登录: 向新玩家致以欢迎并介绍 AI 助手功能。支持自定义服务器信息(通过 greeting.yml 中的 server_info 配置)。


返回登录(三类数据聚合):
| 类别 |
数据来源 |
示例 |
| 个人事件 |
玩家离线期间发生的事件 |
物品售出、收到付款 |
| 好友动态 |
离线期间好友的里程碑事件 |
好友击杀了末影龙 |
| 会话亮点 |
自上次问候以来重要事件 |
宠物死亡、图腾触发、监守者被击败 |

人格系统与 NPC 对话
在 personalities.yml 中定义不同的 AI 人格风格,结合 MythicMobs,NPC 可以拥有独立的人格和对话能力:
common_prompt: "You are an NPC on a Minecraft server, talking to player {player}."
Fox: |
You are a clever fox NPC who speaks playfully and cutely.
Likes to end sentences with "~", often uses emojis.
NPC 对话方法:
方法 1(回调命令,推荐):
fox_npc_skill:
Skills:
- cmd{c="kilacraft plugins Fox What are the server rules <caster.uuid> myplugin handle_ai {response} <caster.name>"} @self
方法 2(MythicMobs 占位符):
fox_npc_skill:
Skills:
- cmd{c="kilacraft plugins Fox What are the server rules <caster.uuid>"} @self
- message{msg="<caster.ai.answer{type=Fox}>"} @trigger
插件命令仅限控制台使用。每个 UUID_personality 组合拥有独立的历史记录。
AFK 任务系统
通过自然语言创建后台监控任务。当满足条件时自动通知或执行操作。




Player: Watch for Steve to come online
AI: Got it! I'll notify you as soon as Steve logs in.
[30 minutes later...]
? Steve has joined the server!
Player: Watch for Steve to come online, then check what he's holding
AI: Will do! I'll automatically check Steve's item when he logs in.
[After Steve joins...]
? Steve is online! He's holding a Diamond Sword x1 in main hand.
支持 20 种监控类型(19 个事件监听器 + 自定义轮询):
| 监控类型 |
描述 |
| 玩家加入/离开 |
监控特定玩家的在线状态 |
| 玩家死亡/重生 |
监控死亡事件和重生 |
| 玩家传送/世界变更 |
监控位置变化 |
| 等级变化 |
监控玩家等级提升/下降 |
| 天气变化 |
监控世界天气 |
| 睡眠/物品损坏 |
进入/离开床铺,物品损坏 |
| 钓鱼 |
捕获时通知或触发操作 |
| 聊天 |
通过关键词触发自动化 |
| 方块破坏 |
挖掘特定方块时触发操作 |
| 实体死亡 |
Boss 击杀检测 |
| 实体生成 |
刷怪笼效率监控 |
| 实体爆炸 |
反破坏警告 |
| 熔炉冶炼 |
冶炼完成时通知 |
| 作物生长 |
作物成熟时通知 |
自定义条件轮询 — 监控 Skills 返回的任何数值条件:
玩家:当我的生命值低于 10 时告诉我
玩家:当我的余额低于 1000 时提醒我
玩家:当我达到 30 级时检查钻石价格
管理:使用 /kilacraft afk 查看,使用 /kilacraft afk cancel 取消。同一时间每位玩家只能有一个任务。
服务器健康监控
基于 Spark 的实时服务器性能监控和 AI 驱动的诊断。守护线程在后台全天候运行,具备自动异常检测和警报功能。
自动监控: 守护线程每 10 秒轮询 TPS/MSPT/CPU 指标。当超过阈值时,它会自动启动 Spark Profiler 采样,完成后调用推理模型生成诊断报告。
手动分析: 用于主动故障排查:
/kilacraft profile start [30-120] # 开始分析(秒)
/kilacraft profile status # 查看状态
/kilacraft profile stop # 中止并丢弃
诊断报告: 包含服务器状态概览、插件耗时及热点方法触发路径(自身耗时)、AI 诊断结论和优化建议。报告永久保存在 plugins/Kilacraft-AI/reports/ 中。

警报通知: 支持游戏内通知 + Discord Webhook / 钉钉机器人外部推送(仅自动模式)。使用 /kilacraft notify test 测试通知渠道。

历史查询: 通过自然语言查询历史警报和报告:
- “过去一天有哪些警报?”
- “列出最近的诊断报告”
- “我昨天升级了 MythicMobs,检查性能是否有所改善”
完整配置指南见 admin.yml。需要 Spark 插件 + 推理模型 API 密钥。Paper 1.21+/Folia/Purpur/Leaf/Pufferfish 内置 Spark。
玩家行为分析
通过自然语言查询服务器的玩家生态。权限:kilacraft.admin.player。
- 在线趋势: “本周玩家的在线趋势如何?” — 登录/登出时间分布
- 活跃度排名: “显示最活跃玩家的排行榜” — 登录次数、游戏时长、最后登录时间
- 新玩家涌入: “本周有多少新玩家加入?” — 数量和时间的分布
- 档案覆盖: “有多少玩家拥有 AI 档案分析?” — 已分析/待分析数量
- 社交洞察: “展示玩家社交网络分析” — 总关系数、平均强度、孤立玩家
- 特定玩家社交关系: “检查 Steve 的社交关系” — 特定玩家的详细社交关系、强度、互动频率
审计日志查询
通过自然语言查询 AI 技能使用情况。权限:kilacraft.admin.audit。
- 执行记录: “查询玩家 Steve 使用了哪些技能” — 技能名称、参数、结果
- 使用统计: “显示技能使用统计排行榜” — 使用次数、成功/失败、平均持续时间
- 错误追踪: “显示失败的技能执行记录” — 失败记录、错误信息、时间分布
AI 技能系统
AI 通过 Skills 与服务器交互,每个 Skill 对应一类操作。所有 Skills 均为只读查询(除非明确标记为写操作),并具有细粒度的权限控制。
功能概览
| 类别 |
功能 |
依赖项 |
权限节点 |
| Bukkit API |
72 个内置只读接口:玩家库存/状态/信息、世界信息、服务器信息、环境感知 |
无 |
kilacraft.api.* |
| Vanilla Stats |
80+ 原版累积统计数据查询、知识库 BM25 检索、自动单位转换 |
无 |
kilacraft.bukkit_stats |
| Global Market |
搜索/列表/收藏/购买订单/下架/转移/拍卖/批量出售/批量购买(9 种操作) |
GlobalMarketPlus |
kilacraft.market.* |
| CMI Integration |
5 个查询(家/传送点/玩家信息/在线/AFK)+ 3 个传送 |
CMI |
kilacraft.cmi.* |
| AFK Tasks |
19 个事件监听器 + 自定义轮询、自然语言创建、通知/回调双模式 |
无 |
kilacraft.afk |
| Utility |
定时延迟、主动通知、全服广播 |
无 |
— |
| Command Execution |
以玩家身份执行命令,继承权限系统(默认禁用) |
无 |
kilacraft.command.execute |
| Sound & Particles |
AI 触发的声音/粒子效果,仅调用者可见/可听,YAML 驱动配置 |
无 |
kilacraft.bukkit_fx |
| Server Admin |
健康监控、玩家分析、审计日志(参见上述高级功能) |
Spark(可选) |
kilacraft.admin.* |
通配符 kilacraft.api.* 和 kilacraft.cmi.* 分别包含所有子权限。



数据与安全
数据持久化
支持 H2 嵌入式数据库(默认,零配置)和 MySQL。数据在重启后保留。MySQL 推荐用于多服务器数据共享。使用 /kilacraft reload 热切换,失败时自动回退。
| 数据 |
描述 |
| Conversation History |
所有玩家-AI 对话,每 30 秒批量刷新 |
| Player Profiles |
八维行为分析结果 |
| Social Relations |
玩家之间的互动强度和类型 |
| Server Events |
里程碑事件,如死亡、成就、交易 |
| Skill Audit |
所有 Skill 执行日志 |
| Profile Snapshots |
档案的历史版本 |
数据保留天数可在 database.yml 中配置。过期数据会自动清理。支持服务器组间数据隔离。
安全性
- 玩家数据隔离:内置非合作安全过滤器会扫描所有技能参数值——自动替换(净化)非自身且未列入白名单的玩家名称
- 第三方技能保护:即使第三方技能尝试操作其他玩家,安全过滤器也会自动净化输入内容
- 技能全局注册表:所有已注册的第三方技能的使用统计和安全审查状态可查看于 Skill Global Registry。经过审查的技能标记为 Verified
开放 SPI 接口
第三方插件开发者可以通过 Skill SPI 接口向 AI 暴露其功能:
- API JAR 仅 5 KB(compileOnly 依赖)
- 实现
SkillProvider 接口以注册自定义技能
- 内置错误隔离——第三方技能的异常不会影响核心功能
请参阅 Skill SPI Integration Guide。
命令与权限
命令列表
| 命令 |
权限 |
描述 |
/kilacraft <message> |
无 |
与 AI 聊天 |
/kila /ai /zm |
无 |
别名 |
/kilacraft chat |
无 |
切换持续聊天模式 |
/kilacraft clear |
kilacraft.clear.self |
清除自己的聊天记录 |
/kilacraft clear <player> |
kilacraft.clear.other |
清除指定玩家的记录 |
/kilacraft reload |
kilacraft.reload |
重新加载配置 |
/kilacraft knowledge reload |
kilacraft.knowledge |
重新加载知识库 |
/kilacraft personalities reload |
kilacraft.personalities |
重新加载人格配置 |
/kilacraft afk |
kilacraft.afk |
查看 AFK 任务 |
/kilacraft afk cancel |
kilacraft.afk |
取消 AFK 任务 |
/kilacraft tasks |
kilacraft.tasks |
查看计划任务状态(默认 OP) |
/kilacraft profile start [seconds] |
kilacraft.admin.health |
开始手动性能分析 |
/kilacraft profile status |
kilacraft.admin.health |
查看性能分析状态 |
/kilacraft profile stop |
kilacraft.admin.health |
中止性能分析并丢弃结果 |
/kilacraft notify test |
kilacraft.admin.health |
测试外部通知渠道 |
/kilacraft plugins ... |
仅限控制台 |
第三方插件集成 |
技能权限
| 权限节点 |
默认值 |
描述 |
kilacraft.api.player.inventory |
true |
查询玩家物品栏 |
kilacraft.api.player.status |
true |
查询玩家状态 |
kilacraft.api.player.info |
true |
查询玩家信息 |
kilacraft.api.world.info |
true |
查询世界信息 |
kilacraft.api.server.info |
true |
查询服务器信息 |
kilacraft.cmi.query |
true |
CMI 信息查询 |
kilacraft.cmi.teleport |
true |
CMI 传送 |
kilacraft.bukkit_fx |
true |
声音与粒子效果 |
kilacraft.bukkit_stats |
true |
原版数据统计查询 |
kilacraft.command.execute |
op |
执行命令(默认仅限 OP) |
kilacraft.tasks |
op |
查看计划任务状态(默认仅限 OP) |
kilacraft.admin.health |
op |
服务器健康监控 |
kilacraft.admin.player |
op |
玩家行为分析 |
kilacraft.admin.audit |
op |
审计日志查询 |
kilacraft.admin.* |
op |
所有管理功能 |
通配符 kilacraft.api.* 和 kilacraft.cmi.* 分别包含所有子权限。
常见问题
问:API 费用高吗?
以 DeepSeek 为例,单次对话成本约为 ¥0.001-0.002。设置冷却时间(默认 5 秒)可有效控制成本。
问:支持哪些大语言模型?
所有 OpenAI 兼容的提供商。普通对话不支持思考/推理模型(如 deepseek-reasoner、o1),但管理功能中的 AI 诊断支持配置推理模型(在 admin.yml 中)。
问:会导致服务器卡顿吗?
不会。所有 API 请求均为异步处理。内存占用 8-50 MB,HTTP 连接池复用,支持流式传输以降低延迟。
问:如何更新?
备份 plugins/Kilacraft-AI/ 目录以保留配置,替换 JAR 文件,然后重启服务器。
社区与资源
MIT 许可证 — 如果觉得有用,请给予一个 ⭐ Star!
Kilacraft-AI
The first plugin that gives every server an AI agent that understands you better the more you use it — powered by LLM intent recognition and skill execution framework
Version Compatibility
Minimum Requirements: Minecraft 1.16.5 + Java 17
| Minecraft Version |
Java Requirement |
Supported Servers |
| 1.16.5 |
Java 17+ |
Paper / Purpur / Leaf / Folia |
| 1.17 - 1.19 |
Java 17+ |
All |
| 1.20 - 1.21+ |
Java 21+ |
All |
One JAR compatible with all versions. Developed on Spigot 1.16.5 API, fully supports Folia regional thread scheduling.
Optional Dependencies
| Plugin |
Version |
Features |
| CMI |
9.8.6.4+ |
Teleport, homes, warps, enhanced player info, TPA |
| GlobalMarketPlus |
1.3.8.0+ |
Market queries, balance, prices, listings |
| MythicMobs |
5.12.0+ |
NPC placeholders (display AI responses) |
| Vault |
Latest |
Multi-currency support |
| Spark |
Latest |
Server performance sampling & analysis (Paper 1.21+ etc. have it built-in) |
Features auto-disable when plugins are missing. Core chat remains unaffected.
Quick Start
1. Install
Download the latest Kilacraft-AI.jar, place it in your server's plugins/ directory, and start the server.
2. Configure API
Edit plugins/Kilacraft-AI/llm.yml with your LLM API credentials:
llm:
api_url: "https://api.deepseek.com/v1/chat/completions"
api_key: "your-api-key"
model: "deepseek-chat"
Supports all OpenAI-compatible providers (DeepSeek, Zhipu AI, Moonshot, OpenAI, Groq, SiliconFlow, Gemini, OpenRouter, etc.). Just change api_url and model to switch.
3. Test
/kila hello
If you see an AI response, you're all set.
Reload config with /kilacraft reload, knowledge base with /kilacraft knowledge reload, personalities with /kilacraft personalities reload.
Core Features
AI Smart Chat




Three Interaction Modes:
# Command mode
/kila How do I get diamonds?
# Continuous chat mode
/kilacraft chat
> I want to build a farm
> AI: Great idea! What crop do you want to plant?
# Keyword trigger (public chat)
@ai How do I craft this?
Command aliases: /kilacraft, /kila, /ai, /zm
Streaming Output & Carriers:
AI responses display character by character in real-time, eliminating wait. Supports 5 output carriers, configurable per scenario:
| Carrier |
Effect |
Best For |
| SIDEBAR |
Right sidebar, no FOV obstruction |
Long responses (recommended) |
| BOSS_BAR |
Top bar |
Medium-length text |
| ACTION_BAR |
Above hotbar |
Short notifications |
| CHAT |
Chat box |
Default |
| TITLE |
Screen center |
Short highlights |
AI Response Sound:
Plays a sound when AI starts responding, only the triggering player hears it. Configured in output.yml:
output:
sound:
enabled: true
sound_name: "ENTITY_PLAYER_LEVELUP"
volume: 0.5
pitch: 1.2
Knowledge Base Enhancement
Let AI understand your server rules, gameplay, and FAQ. Just place Markdown or TXT files in plugins/Kilacraft-AI/knowledge/:
# server_rules.md
## How to claim land?
Use the /claim command to define your territory. Costs at least 10 coins.
Run /kilacraft knowledge reload to load. AI automatically retrieves and cites relevant content when players ask questions. Supports custom dictionaries for server-specific terminology to improve search accuracy.



Advanced Features
Player Profile & Social Relations
Player Profile: AI automatically analyzes player conversation history and builds an eight-dimension behavioral profile for each player, dynamically injecting profile summaries as reference context in subsequent conversations. AI gets smarter about your players over time.

| Dimension |
Description |
Example |
| Playstyle |
Gameplay preferences |
Combat-oriented, Explorer, Builder |
| Personality |
Behavioral patterns |
Friendly, Humorous, Direct |
| Interests |
Liked areas and activities |
Economy & trading, Redstone, Building |
| Boundaries |
Disliked content or behaviors |
Don't use my name, Don't rush me |
| Communication |
Preferred AI response style |
Brief & direct, No emojis |
| Spatial Memory |
Mentioned locations, base positions |
Main base at desert (1200,64,-800) |
| Known Facts |
Explicitly stated facts by the player |
Steve is a friend, Home near desert temple |
| Special Observations |
AI freeform observations |
"This player has recently shown interest in enchanting" |
Automatically triggers analysis on player login/logout (triple gate mechanism to prevent wasting API calls). Configured in llm.yml:
agent:
profile:
enabled: true
min_interval_minutes: 30 # Minimum analysis interval
min_message_delta: 20 # Minimum new message count
Social Relations: Automatically tracks interactions between players (private messages, TPA, skill interactions), building a social relationship graph. Relationship strength uses diminishing incremental algorithm — inactive relationships naturally decay over time.
- Friends' milestone events (boss kills, raid completions, pet deaths, etc.) appear in each other's login greetings
- AI can sense "who's friends with whom" and naturally mention friend dynamics in conversations


Login Greeting
AI automatically sends personalized greetings when players log in. Based on player profiles, offline events, and friend dynamics, every greeting is unique.
First Login: Welcomes new players with an introduction to AI assistant features. Supports custom server info (configured via server_info in greeting.yml).


Returning Login (Three-Category Data Aggregation):
| Category |
Data Source |
Example |
| Own Events |
Events that happened while player was offline |
Items sold, payments received |
| Friend Dynamics |
Friends' milestones during offline period |
Friend killed the Ender Dragon |
| Session Highlights |
Important events since last greeting |
Pet killed, totem triggered, Warden defeated |

Personality System & NPC Dialogue
Define different AI personality styles in personalities.yml, and with MythicMobs, NPCs can have independent personalities and dialogue capabilities:
common_prompt: "You are an NPC on a Minecraft server, talking to player {player}."
Fox: |
You are a clever fox NPC who speaks playfully and cutely.
Likes to end sentences with "~", often uses emojis.
NPC Dialogue Methods:
Method 1 (Callback Command, recommended):
fox_npc_skill:
Skills:
- cmd{c="kilacraft plugins Fox What are the server rules <caster.uuid> myplugin handle_ai {response} <caster.name>"} @self
Method 2 (MythicMobs Placeholder):
fox_npc_skill:
Skills:
- cmd{c="kilacraft plugins Fox What are the server rules <caster.uuid>"} @self
- message{msg="<caster.ai.answer{type=Fox}>"} @trigger
Plugin commands are console-only. Each UUID_personality combination has independent history.
AFK Task System
Create background monitoring tasks via natural language. Automatically notifies or executes actions when conditions are met.




Player: Watch for Steve to come online
AI: Got it! I'll notify you as soon as Steve logs in.
[30 minutes later...]
? Steve has joined the server!
Player: Watch for Steve to come online, then check what he's holding
AI: Will do! I'll automatically check Steve's item when he logs in.
[After Steve joins...]
? Steve is online! He's holding a Diamond Sword x1 in main hand.
Supports 20 monitoring types (19 event listeners + custom polling):
| Monitor Type |
Description |
| Player Join/Quit |
Monitor specific player online status |
| Player Death/Respawn |
Monitor death events and respawns |
| Player Teleport/World Change |
Monitor position changes |
| Level Change |
Monitor player level ups/downs |
| Weather Change |
Monitor world weather |
| Sleep/Item Break |
Enter/leave bed, item breakage |
| Fishing |
Notify or trigger actions on catch |
| Chat |
Trigger automation via keywords |
| Block Break |
Trigger actions when specific blocks mined |
| Entity Death |
Boss kill detection |
| Entity Spawn |
Mob farm efficiency monitoring |
| Entity Explosion |
Anti-grief warning |
| Furnace Smelt |
Notify when smelting completes |
| Crop Growth |
Notify when crops mature |
Custom Condition Polling — Monitor any numeric condition returned by Skills:
Player: Tell me when my health drops below 10
Player: Remind me when my balance goes below 1000
Player: Check diamond price when I reach level 30
Management: /kilacraft afk to view, /kilacraft afk cancel to cancel. One task per player at a time.
Server Health Monitoring
Real-time server performance monitoring and AI-powered diagnostics based on Spark. A daemon thread runs 24/7 in the background with automatic anomaly detection and alerting.
Automatic Monitoring: The daemon thread polls TPS/MSPT/CPU metrics every 10 seconds. When thresholds are exceeded, it automatically launches Spark Profiler sampling, then calls the reasoning model to generate a diagnostic report upon completion.
Manual Profiling: Use for proactive troubleshooting:
/kilacraft profile start [30-120] # Start profiling (seconds)
/kilacraft profile status # View status
/kilacraft profile stop # Abort and discard
Diagnostic Reports: Includes server status overview, plugin timing and hot method trigger paths (self time), AI diagnostic conclusions and optimization recommendations. Reports are saved in plugins/Kilacraft-AI/reports/ permanently.

Alert Notifications: Supports in-game notifications + Discord Webhook / DingTalk bot external push (automatic mode only). Use /kilacraft notify test to test notification channels.

Historical Queries: Query historical alerts and reports via natural language:
- "What alerts have there been in the past day?"
- "List recent diagnostic reports"
- "I upgraded MythicMobs yesterday, check if performance has improved"
Full configuration guide in admin.yml. Requires Spark plugin + reasoning model API key. Paper 1.21+/Folia/Purpur/Leaf/Pufferfish have Spark built-in.
Player Behavior Analysis
Query your server's player ecosystem via natural language. Permission: kilacraft.admin.player.
- Online Trends: "What's the player online trend this week?" — Login/logout time distribution
- Activity Rankings: "Show the most active players leaderboard" — Login count, playtime, last login
- New Player Influx: "How many new players joined this week?" — Count and time distribution
- Profile Coverage: "How many players have AI profile analysis?" — Analyzed/pending count
- Social Insights: "Show player social network analysis" — Total relations, average strength, isolated players
- Specific Player Social Relations: "Check Steve's social relations" — Detailed social relations, strength, interaction frequency for a specific player
Audit Log Query
Query AI skill usage via natural language. Permission: kilacraft.admin.audit.
- Execution Records: "Query what skills player Steve has used" — Skill name, parameters, results
- Usage Statistics: "Show skill usage statistics leaderboard" — Usage count, success/failure, avg duration
- Error Tracking: "Show failed skill execution records" — Failure records, error messages, time distribution
AI Skill System
AI interacts with the server through Skills, each corresponding to a category of operations. All Skills are read-only queries (except explicitly marked write operations), with fine-grained permission control.
Capabilities Overview
| Category |
Capabilities |
Dependency |
Permission Node |
| Bukkit API |
72 built-in read-only interfaces: player inventory/status/info, world info, server info, environment awareness |
None |
kilacraft.api.* |
| Vanilla Stats |
80+ vanilla cumulative stat queries, knowledge base BM25 retrieval, auto unit conversion |
None |
kilacraft.bukkit_stats |
| Global Market |
Search/list/collect/buy-order/delist/transfer/auction/bulk-sell/bulk-buy (9 operations) |
GlobalMarketPlus |
kilacraft.market.* |
| CMI Integration |
5 queries (home/warp/player info/online/AFK) + 3 teleports |
CMI |
kilacraft.cmi.* |
| AFK Tasks |
19 event listeners + custom polling, natural language creation, notification/callback dual mode |
None |
kilacraft.afk |
| Utility |
Timed delay, proactive notification, server-wide broadcast |
None |
— |
| Command Execution |
Execute commands as player, inherits permission system (disabled by default) |
None |
kilacraft.command.execute |
| Sound & Particles |
AI-triggered sounds/particles, only caller perceives, YAML-driven config |
None |
kilacraft.bukkit_fx |
| Server Admin |
Health monitoring, player analysis, audit logs (see Advanced Features above) |
Spark (optional) |
kilacraft.admin.* |
Wildcards kilacraft.api.* and kilacraft.cmi.* include all sub-permissions respectively.



Data & Security
Data Persistence
Supports both H2 embedded database (default, zero-config) and MySQL. Data persists across restarts. MySQL recommended for multi-server data sharing. Hot-switch with /kilacraft reload, auto-fallback on failure.
| Data |
Description |
| Conversation History |
All player-AI conversations, batch flushed every 30 seconds |
| Player Profiles |
Eight-dimension behavioral analysis results |
| Social Relations |
Interaction strength and type between players |
| Server Events |
Milestone events like deaths, achievements, trades |
| Skill Audit |
All Skill execution logs |
| Profile Snapshots |
Profile historical versions |
Data retention days configurable in database.yml. Expired data is automatically cleaned up. Group server data isolation.
Security
- Player Data Isolation: Built-in non-cooperative security filter scans all Skill parameter values — non-self, non-whitelisted player names are automatically replaced (sanitization)
- Third-Party Skill Protection: Even if a third-party Skill attempts to operate on other players, the security filter automatically sanitizes inputs
- Skill Global Registry: Usage statistics and security review status of all registered third-party Skills at Skill Global Registry. Reviewed Skills marked as Verified
Open SPI Interface
Third-party plugin developers can expose their features to AI via the Skill SPI interface:
- API JAR only 5 KB (compileOnly dependency)
- Implement
SkillProvider interface to register custom Skills
- Built-in error isolation — third-party Skill exceptions don't affect core functionality
See Skill SPI Integration Guide.
Commands & Permissions
Command List
| Command |
Permission |
Description |
/kilacraft <message> |
None |
Chat with AI |
/kila /ai /zm |
None |
Aliases |
/kilacraft chat |
None |
Toggle continuous chat mode |
/kilacraft clear |
kilacraft.clear.self |
Clear own chat history |
/kilacraft clear <player> |
kilacraft.clear.other |
Clear specified player's history |
/kilacraft reload |
kilacraft.reload |
Reload config |
/kilacraft knowledge reload |
kilacraft.knowledge |
Reload knowledge base |
/kilacraft personalities reload |
kilacraft.personalities |
Reload personality config |
/kilacraft afk |
kilacraft.afk |
View AFK tasks |
/kilacraft afk cancel |
kilacraft.afk |
Cancel AFK task |
/kilacraft tasks |
kilacraft.tasks |
View scheduled task status (default OP) |
/kilacraft profile start [seconds] |
kilacraft.admin.health |
Start manual profiling |
/kilacraft profile status |
kilacraft.admin.health |
View profiling status |
/kilacraft profile stop |
kilacraft.admin.health |
Abort profiling and discard |
/kilacraft notify test |
kilacraft.admin.health |
Test external notification channels |
/kilacraft plugins ... |
Console only |
Third-party plugin integration |
Skill Permissions
| Permission Node |
Default |
Description |
kilacraft.api.player.inventory |
true |
Query player inventory |
kilacraft.api.player.status |
true |
Query player status |
kilacraft.api.player.info |
true |
Query player info |
kilacraft.api.world.info |
true |
Query world info |
kilacraft.api.server.info |
true |
Query server info |
kilacraft.cmi.query |
true |
CMI info queries |
kilacraft.cmi.teleport |
true |
CMI teleportation |
kilacraft.bukkit_fx |
true |
Sound & particle effects |
kilacraft.bukkit_stats |
true |
Vanilla stats queries |
kilacraft.command.execute |
op |
Command execution (OP only by default) |
kilacraft.tasks |
op |
View scheduled task status (OP by default) |
kilacraft.admin.health |
op |
Server health monitoring |
kilacraft.admin.player |
op |
Player behavior analysis |
kilacraft.admin.audit |
op |
Audit log query |
kilacraft.admin.* |
op |
All admin features |
Wildcards kilacraft.api.* and kilacraft.cmi.* include all sub-permissions respectively.
FAQ
Q: Is the API expensive?
With DeepSeek as an example, a single conversation costs approximately ¥0.001-0.002. Setting cooldown time (default 5 seconds) effectively controls costs.
Q: Which LLMs are supported?
All OpenAI-compatible providers. Regular conversations do not support thinking/reasoning models (like deepseek-reasoner, o1), but the admin features' AI diagnostics support configuring a reasoning model (in admin.yml).
Q: Will it lag the server?
No. All API requests are async. Memory usage 8-50 MB, HTTP connection pool reuse, supports streaming to reduce latency.
Q: How to update?
Back up plugins/Kilacraft-AI/ to preserve configs, replace the JAR, restart the server.
Community & Resources
|
Source Code
|
Community
|
|
Documentation
|
Contributing
|
MIT License — If you find this useful, a ⭐ Star would be appreciated!
评论 0
登录后参与评分
还没有评论,来抢沙发吧