▶️ ЗАБЕРИ СВОИ 8 ПОДАРКОВ 🎁 ПРИ СОЗДАНИИ СВОЕГО МАЙНКРАФТ СЕРВЕРА
LLMChat

LLMChat

A powerful Minecraft AI chat plugin supporting multiple LLM APIs

Оцените первым
74
0

LLMChat

图片由 Gemini Nano Banana 2 生成

一个强大的 Minecraft 服务器 AI 聊天插件

让玩家在游戏中与各种大语言模型 (LLM) 进行对话

License

English | 中文文档 | 作者官网


Github


中文文档

简介

你是否想过让 Minecraft 服务器中的玩家能够直接与 AI 对话?LLMChat 让这一切变得简单。

LLMChat 是一个为 Minecraft 服务器设计的 AI 聊天插件,支持多种大语言模型 API,让玩家可以在游戏中与 AI 进行自然对话。无论是回答游戏问题、提供服务器帮助,还是简单的闲聊,LLMChat 都能胜任。

[!TIP] 支持所有兼容 OpenAI API 格式的服务,包括 OpenAI、SiliconFlow、DeepSeek、Azure OpenAI 等。

功能特性

特性描述
🔌 多 API 支持同时配置多个 LLM API(如 OpenAI、SiliconFlow 等)
🎭 多模型选择每个 API 可配置多个模型,玩家可自由选择
⌨️ 灵活命令支持指定 API 和模型进行对话
⏱️ 冷却管理可配置的请求频率限制,防止 API 滥用
📋 白名单系统特定玩家可绕过冷却限制
📝 聊天日志自动记录所有对话,按日期分文件存储
🩺 健康检查控制台命令检查所有 API 和模型的可用性
🔄 热重载无需重启服务器即可重新加载配置
🔒 安全设计强制 HTTPS 连接,敏感信息自动脱敏

环境要求

依赖版本要求
Minecraft ServerPaper 1.20+ (或 Spigot/Bukkit 兼容)
Java21 或更高版本

安装

  1. 从 Releases 页面下载最新的 LLMChat-x.x.jar
  2. 将 jar 文件放入服务器的 plugins 目录
  3. 启动服务器,插件会自动生成配置文件
  4. 编辑 plugins/LLMChat-Sodium_Sulfate/config.yml 配置你的 API
  5. 使用 /llmchat reload 重载配置(控制台)

[!WARNING] 请勿将包含真实 API Key 的 config.yml 上传到公开仓库!

配置说明

# 默认使用的 API
default_api: "siliconflow"

# 帮助信息(支持 Minecraft 颜色代码)
help_message:
  - "&e========== LLMChat 帮助 =========="
  - "&b/llmchat <消息> &7- 使用默认API和模型与AI对话"
  - "&b/llmchat -api:<名称> <消息> &7- 使用指定API"
  - "&b/llmchat -model:<名称> <消息> &7- 使用指定模型"
  - "&e=================================="

# 冷却时间配置
cooldown:
  whitelist:          # 绕过冷却的玩家列表
    - "admin"
  default:            # 默认冷却设置
    max_requests_per_minute: 5
    cooldown_seconds: 60
  models:             # 特定模型的冷却设置
    qwen:
      max_requests_per_minute: 10
      cooldown_seconds: 30

# API 配置
apis:
  siliconflow:
    url: "https://api.siliconflow.cn/v1/chat/completions"
    api_key: "YOUR_API_KEY"
    default_model: "qwen"
    system_prompt: "你是Minecraft服务器中的AI助手,说话简短(不超过80字),用中文回答。"
    models:
      qwen:
        model_id: "Qwen/Qwen3-8B"
      deepseek:
        model_id: "deepseek-ai/DeepSeek-V3"

命令

命令描述权限
/llmchat <消息>使用默认 API 和模型对话llmchat.use
/llmchat -api:<名称> <消息>使用指定 API 对话llmchat.use
/llmchat -model:<名称> <消息>使用指定模型对话llmchat.use
/llmchat -api:<名称> -model:<名称> <消息>同时指定 API 和模型llmchat.use
/llmchat list列出所有可用的 API 和模型llmchat.list
/llmchat help显示帮助信息-
/llmchat check检查所有 API 可用性(仅控制台)llmchat.admin
/llmchat reload重载配置(仅控制台)llmchat.admin

权限

权限描述默认
llmchat.use使用 AI 对话功能所有人
llmchat.list查看 API 和模型列表所有人
llmchat.admin管理员命令 (reload, check)OP
llmchat.bypass.cooldown绕过冷却时间限制OP
llmchat.*所有 LLMChat 权限OP

支持的 API 服务

理论上支持所有兼容 OpenAI API 格式的服务:

服务商状态备注
OpenAIGPT-3.5, GPT-4
SiliconFlowQwen, DeepSeek 等
DeepSeekDeepSeek 系列
Azure OpenAI需配置正确的 endpoint
Cloudflare Workers AI-
通义千问阿里云
智谱 AIGLM 系列
MoonshotKimi 系列
其他 OpenAI 兼容 API只需配置正确的 URL

构建

# 克隆仓库
git clone https://github.com/SodiumSulfate/LLMChat.git
cd LLMChat

# 使用 Maven 构建
mvn clean package

# 构建产物位于 target/LLMChat-x.x.jar

贡献指南

欢迎提交 Issue 和 Pull Request!

  1. Fork 本仓库
  2. 创建特性分支 (git checkout -b feature/AmazingFeature)
  3. 提交更改 (git commit -m 'Add some AmazingFeature')
  4. 推送到分支 (git push origin feature/AmazingFeature)
  5. 创建 Pull Request

[!NOTE] 提交 PR 前请确保代码风格与现有代码一致,并通过编译测试。

许可证

本项目采用 GNU General Public License v3.0 开源协议。

重要条款

  • ✅ 可以自由使用、修改和分发
  • ⚠️ 修改后的版本必须开源并以相同协议发布
  • ⚠️ 引用或整合本代码的项目必须开源并以相同协议发布
  • ⚠️ 必须保留原始版权声明和许可证

English

Introduction

Have you ever wanted players on your Minecraft server to chat directly with AI? LLMChat makes it simple.

LLMChat is an AI chat plugin designed for Minecraft servers, supporting multiple LLM APIs, allowing players to have natural conversations with AI in-game. Whether answering game questions, providing server help, or just casual chat, LLMChat handles it all.

[!TIP] Supports all OpenAI API compatible services, including OpenAI, SiliconFlow, DeepSeek, Azure OpenAI, and more.

Features

FeatureDescription
🔌 Multiple API SupportConfigure multiple LLM APIs simultaneously (OpenAI, SiliconFlow, etc.)
🎭 Multiple Model SelectionEach API can have multiple models for players to choose from
⌨️ Flexible CommandsSpecify API and model for conversations
⏱️ Cooldown ManagementConfigurable rate limiting to prevent API abuse
📋 Whitelist SystemSpecific players can bypass cooldown restrictions
📝 Chat LoggingAutomatic conversation logging with daily file rotation
🩺 Health CheckConsole command to check availability of all APIs and models
🔄 Hot ReloadReload configuration without server restart
🔒 Security DesignEnforced HTTPS connections, automatic sensitive data sanitization

Requirements

DependencyVersion
Minecraft ServerPaper 1.20+ (or Spigot/Bukkit compatible)
Java21 or higher

Installation

  1. Download the latest LLMChat-x.x.jar from Releases
  2. Place the jar file in your server's plugins directory
  3. Start the server, the plugin will generate configuration files
  4. Edit plugins/LLMChat-Sodium_Sulfate/config.yml to configure your APIs
  5. Use /llmchat reload to reload configuration (console only)

[!WARNING] Never upload config.yml containing real API keys to public repositories!

Commands

CommandDescriptionPermission
/llmchat <message>Chat with default API and modelllmchat.use
/llmchat -api:<name> <message>Use specified APIllmchat.use
/llmchat -model:<name> <message>Use specified modelllmchat.use
/llmchat listList all available APIs and modelsllmchat.list
/llmchat helpShow help message-
/llmchat checkCheck API availability (console only)llmchat.admin
/llmchat reloadReload configuration (console only)llmchat.admin

Permissions

PermissionDescriptionDefault
llmchat.useUse AI chat featureEveryone
llmchat.listView API and model listEveryone
llmchat.adminAdmin commands (reload, check)OP
llmchat.bypass.cooldownBypass cooldown restrictionsOP
llmchat.*All LLMChat permissionsOP

Supported APIs

Theoretically supports all OpenAI API compatible services:

ProviderStatusNotes
OpenAIGPT-3.5, GPT-4
SiliconFlowQwen, DeepSeek, etc.
DeepSeekDeepSeek series
Azure OpenAIRequires correct endpoint
Cloudflare Workers AI-
Other OpenAI-compatible APIsJust configure the correct URL

Building

# Clone the repository
git clone https://github.com/SodiumSulfate/LLMChat.git
cd LLMChat

# Build with Maven
mvn clean package

# Output: target/LLMChat-x.x.jar

Contributing

Issues and Pull Requests are welcome!

  1. Fork this repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Create a Pull Request

[!NOTE] Please ensure your code style is consistent with existing code and passes compilation before submitting a PR.

License

This project is licensed under the GNU General Public License v3.0.

Key Terms:

  • ✅ Free to use, modify, and distribute
  • ⚠️ Modified versions must be open source under the same license
  • ⚠️ Projects that use or integrate this code must be open source under the same license
  • ⚠️ Original copyright notice and license must be preserved

Made with ❤️ by Sodium_Sulfate

Часто задаваемые вопросы

Совместимость

Minecraft: Java Edition

1.21.x

Поддерживаемые окружения

Сервер

Ссылки

Детали

Лицензия:
Опубликован:3 месяца назад
Обновлён:3 месяца назад
Главная