AIAgent
AIAgent 是一款服务器管理插件,将 Google 的 Gemini AI 直接集成到你的 Minecraft 服务器中。它不仅仅是一个聊天机器人,而是一个自主代理(agent)。它可以读取服务器文件、安全地修改配置,并根据自然语言提示执行控制台命令。
你无需记住复杂的命令语法或深入 YAML 文件去查找特定设置。只需告诉 AI 你想做什么即可。
功能特性
- 智能配置编辑:AI 不会盲目猜测配置键名。如果你要求它修改某个插件的配置(例如,“在 ViaVersion 中禁用更新检查”),代理会先读取目标
config.yml,定位到确切正确的键名,然后再应用更改。
- 保留 YAML 格式:在修改配置文件时,插件会保持你现有的缩进和间距,确保你的配置文件不会出错。
- 上下文感知命令:AI 知道是谁在执行命令。如果你输入
/aiagent make me op 或 /aiagent heal me,它会自动针对你的确切用户名进行操作。
- 内置安全性:默认情况下,AI 不会立即执行任何操作。它会明确告诉你它想要编辑哪些文件、更改哪些键或运行哪些命令。你必须输入
/aiagent confirm 来应用更改,或输入 /aiagent cancel 来中止。
- 免费使用:由 Google 的 Gemini API 提供支持(默认为
gemini-3-flash),提供非常慷慨的免费额度。需要 API 密钥。
示例
你可以使用纯英语(或 Gemini 理解的任何其他语言)来控制你的服务器:
/aiagent change the render distance to 8
(在 server.properties 中找到 view-distance 并更新它)
/aiagent make it morning and clear the weather
(执行 /time set day 和 /weather clear)
/aiagent disable the check-for-updates in viaversion
(读取 plugins/ViaVersion/config.yml,找到正确的设置并更新它)
安装与设置
- 将
AIAgent.jar 放入服务器的 plugins 文件夹中。
- 启动服务器一次以生成
config.yml 文件。
- 从 Google AI Studio 获取一个免费的 API 密钥。
- 打开
plugins/AIAgent/config.yml 并粘贴你的 API 密钥:
gemini-api-key: "YOUR_API_KEY_HERE"
model: "gemini-3-flash"
require-confirmation: true
- 重启服务器或重载插件。
命令与权限
/aiagent <prompt> - 让 AI 做某事。
/aiagent confirm - 批准 AI 提议的操作。
/aiagent cancel - 取消待处理的操作。
权限节点: aiagent.admin(默认为 OP)。仅将此权限授予高度信任的管理员,因为它允许修改根服务器文件并执行控制台命令。
AIAgent
AIAgent is a server management plugin that integrates Google's Gemini AI directly into your Minecraft server. Instead of just acting as a chatbot, this plugin acts as an autonomous agent. It can read server files, modify configurations safely, and execute console commands based on natural language prompts.
You don't need to remember complex command syntaxes or dig through YAML files to find a specific setting. Just tell the AI what you want to do.
Features
- Smart Configuration Editing: The AI doesn't just blindly guess config keys. If you ask it to modify a plugin (e.g., "disable update checks in ViaVersion"), the agent will first read the target
config.yml, locate the exact correct key, and then apply the change.
- Preserves YAML Formatting: When modifying configuration files, the plugin maintains your existing indentations and spacing so your configs won't break.
- Context-Aware Commands: The AI knows who is executing the command. If you type
/aiagent make me op or /aiagent heal me, it automatically targets your exact username.
- Built-in Safety: By default, the AI will not execute anything immediately. It will tell you exactly which files it wants to edit, what keys it wants to change, or what commands it wants to run. You must type
/aiagent confirm to apply the changes or /aiagent cancel to abort.
- Free to Use: Powered by Google's Gemini API (defaults to
gemini-3-flash), which offers a very generous free tier. API key required.
Examples
You can use plain English (or any other language Gemini understands) to control your server:
/aiagent change the render distance to 8
(Finds view-distance in server.properties and updates it)
/aiagent make it morning and clear the weather
(Executes /time set day and /weather clear)
/aiagent disable the check-for-updates in viaversion
(Reads plugins/ViaVersion/config.yml, finds the right setting, and updates it)
Setup & Installation
- Drop the
AIAgent.jar into your server's plugins folder.
- Start the server once to generate the
config.yml file.
- Get a free API key from Google AI Studio.
- Open
plugins/AIAgent/config.yml and paste your API key:
gemini-api-key: "YOUR_API_KEY_HERE"
model: "gemini-3-flash"
require-confirmation: true
- Restart the server or reload the plugin.
Commands & Permissions
/aiagent <prompt> - Ask the AI to do something.
/aiagent confirm - Approve the AI's proposed actions.
/aiagent cancel - Cancel the pending actions.
Permission node: aiagent.admin (Defaults to OP). Only grant this permission to highly trusted administrators, as it allows modifying root server files and executing console commands.
评论 0
登录后参与评分
还没有评论,来抢沙发吧