Version 1.1.4
Changes in this Update:
Bug Fixes 🐛
- Spigot and Bukkit Compatibility
Architectural 🧱
- Database Manager Refactoring:
- Removed HikariCP dependency and replaced connection pooling with direct
DriverManager
connections for MySQL and SQLite.
- Removed HikariCP dependency and replaced connection pooling with direct
Dependency Management 📦
- Runtime Dependency Loading:
- Added
DependencyLoader
class to download and load dependencies (mysql-connector-java:8.0.33
,sqlite-jdbc:3.46.0.0
) at runtime from Maven Central toplugins/OllamaChat/libs
. - Updated
build.gradle
to usecompileOnly
for non-Paper dependencies, reducing JAR size. - Modified
Ollamachat
main class to initializeDependencyLoader
before other components.
- Added
Configuration Updates 🌐
- Database Configuration:
- Supports both MySQL and SQLite with fallback to SQLite if MySQL initialization fails.
- Configuration example for
config.yml
:database: type: mysql mysql: host: localhost port: 3306 database: ollamachat username: root password: ""
Important Notes:
- ⚠️ Configuration Requirement:
- Ensure
config.yml
includes valid MySQL or SQLite settings. Missing or incorrect settings may cause fallback to SQLite. - Backup existing
config.yml
before updating to avoid data loss.
- Ensure
- 🔄 Dependency Download:
- On first startup, the plugin downloads dependencies to
plugins/OllamaChat/libs
. Ensure the server has internet access. - Delete the
libs
folder to force re-download if dependencies are corrupted.
- On first startup, the plugin downloads dependencies to
版本 1.1.4
本次更新的主要变更:
错误修复 🐛
- Spigot 和 Bukkit 兼容性
架构 🧱
- 数据库管理器重构:
- 移除 HikariCP 依赖,改用直接
DriverManager
连接支持 MySQL 和 SQLite。
- 移除 HikariCP 依赖,改用直接
依赖管理 📦
- 运行时依赖加载:
- 新增
DependencyLoader
类,从 Maven Central 下载并加载依赖(mysql-connector-java:8.0.33
,sqlite-jdbc:3.46.0.0
)到plugins/OllamaChat/libs
。 - 更新
build.gradle
,对非 Paper 依赖使用compileOnly
,减少 JAR 大小。 - 修改
Ollamachat
主类,在其他组件初始化前加载DependencyLoader
。
- 新增
配置更新 🌐
- 数据库配置:
- 支持 MySQL 和 SQLite,若 MySQL 初始化失败则回退到 SQLite。
config.yml
配置示例:database: type: mysql mysql: host: localhost port: 3306 database: ollamachat username: root password: ""
注意事项:
- ⚠️ 配置要求:
- 确保
config.yml
包含有效的 MySQL 或 SQLite 配置,错误配置可能导致回退到 SQLite。 - 建议备份现有
config.yml
以防数据丢失。
- 确保
- 🔄 依赖下载:
- 首次启动时,插件会将依赖下载到
plugins/OllamaChat/libs
,确保服务器具备网络连接。 - 如依赖损坏,可删除
libs
文件夹以重新下载。
- 首次启动时,插件会将依赖下载到
Version 1.1.2
Changes in this Update:
New Features
- Configurable Response Suggestion Count: Set the number of suggested responses via
suggested-response-count
(default: 3). - Customizable Suggestion Prompt Template: Added
suggested-response-prompt
for tailored suggestion generation. - Preset Suggested Responses: Introduced
suggested-response-presets
(e.g., "I see what you mean.") with toggle viasuggested-response-presets-enabled
. - Model-Specific Suggestion Toggles: Control suggestion generation per model with
suggested-response-model-toggles
. - Suggestion Hover Text: Added hover text for suggested responses to enhance interactivity.
- New Command:
/ollamachat suggests toggle
to enable/disable suggestions, withollamachat.suggests.toggle
permission. - Suggestion Rate Limiting: Added
suggested-response-cooldown
(default: 10 seconds) to prevent suggestion spam.
Fixes
- Fixed Default Language Error: Corrected incorrect default language setting in the configuration file.
Configuration Updates
- New Configuration Options:
suggested-response-count: 3 suggested-response-prompt: "Conversation:\nUser: {prompt}\nAI: {response}\n\nBased on the above conversation, suggest {count} natural follow-up responses the user might want to say. They should be conversational in tone rather than questions. List them as:\n1. Response 1\n2. Response 2\n3. Response 3" suggested-response-presets: - "I see what you mean." - "That's interesting!" - "Tell me more about that." suggested-response-presets-enabled: false suggested-response-model-toggles: - llama3 suggested-response-cooldown: 10
- Note: Backup existing configuration before updating to ensure compatibility with new structure.
Optimizations
- Improved suggestion generation logic for faster and more accurate responses.
- New permissions:
ollamachat.suggests.toggle
andollamachat.suggests-presets.toggle
.
Important Notes:
- ⚠️ Configuration Changes:
- New configuration options added for enhanced suggestion customization.
- Recommended to back up old config and regenerate.
- 🔄 Delete
lang
directory to regenerate localization files. - 💡 Suggested responses and presets are disabled by default; enable via configuration.
版本 1.1.2
本次更新的主要变更:
新增功能
- 可配置建议回复数量:通过
suggested-response-count
设置建议回复数量(默认:3 条)。 - 自定义建议提示模板:新增
suggested-response-prompt
,支持自定义建议回复生成模板。 - 固定建议回复预备:新增
suggested-response-presets
(如 "I see what you mean."),通过suggested-response-presets-enabled
启用/禁用。 - 按模型建议开关:通过
suggested-response-model-toggles
控制各模型的建议回复功能。 - 建议回复悬停文本:为建议回复添加悬停提示,提升交互体验。
- 新命令:
/ollamachat suggests toggle
用于开关建议回复,权限为ollamachat.suggests.toggle
。 - 建议回复速率限制:新增
suggested-response-cooldown
(默认:10 秒),避免频繁生成建议。
修复
- 修复默认语言错误:修正配置文件中默认语言设置错误。
配置更新
- 新增配置项:
suggested-response-count: 3 suggested-response-prompt: "Conversation:\nUser: {prompt}\nAI: {response}\n\nBased on the above conversation, suggest {count} natural follow-up responses the user might want to say. They should be conversational in tone rather than questions. List them as:\n1. Response 1\n2. Response 2\n3. Response 3" suggested-response-presets: - "I see what you mean." - "That's interesting!" - "Tell me more about that." suggested-response-presets-enabled: false suggested-response-model-toggles: - llama3 suggested-response-cooldown: 10
- 注意:建议备份旧配置文件后重新生成,以兼容新配置结构。
优化
- 优化建议回复生成逻辑,生成速度更快、结果更精准。
- 新增权限:
ollamachat.suggests.toggle
和ollamachat.suggests-presets.toggle
。
注意事项:
- ⚠️ 配置文件变更:
- 新增建议回复相关配置项。
- 建议备份旧配置后再更新。
- 🔄 删除
lang
目录以重新生成语言文件。 - 💡 建议回复及预设默认关闭,需在配置文件中手动启用。
Version 1.1.1
Changes in this Update:
Architectural Optimization 🧱
- Modular Refactoring:
- Codebase restructured into three functional modules:
chat
package: Core handlers (ChatTriggerHandler
) + new Suggested Response Processor (SuggestedResponseHandler
)command
package: Centralized AI command implementations (AIChatCommand
/OllamaChatCommand
) with tab completioncore
package: Main class (Ollamachat
) and configuration manager (ConfigManager
)
- Codebase restructured into three functional modules:
New Features ✨
- Smart Response Suggestions:
- Added
SuggestedResponseHandler
for multi-model collaboration - Generates 3 clickable follow-up questions after each AI response
- Configurable via YAML:
suggested-responses-enabled: true suggested-response-models: - llama3
- Added
Localization & Configuration 🌐
- Language File Updates:
- New entries for response suggestions:
"suggested-responses-header": "§a[OllamaChat] Suggested Responses:", "suggested-response-prefix": "§7[Click to Reply] §f"
- New entries for response suggestions:
Important Notes:
- ⚠️ Configuration Changes:
- New
suggested-responses
config section added - Recommended to backup old config before updating
- New
- 🔄 Delete
lang
directory to regenerate localization files - 💡 Response suggestions disabled by default (enable in config)
版本 1.1.1
本次更新的主要变更:
架构优化 🧱
- 模块化重构:
- 代码结构按功能拆分为三大模块:
chat
包:包含聊天核心处理器(ChatTriggerHandler
)和新增的候选回复处理器(SuggestedResponseHandler
)command
包:集中管理所有AI命令实现(AIChatCommand
/OllamaChatCommand
)及自动补全逻辑(TabCompleter
)core
包:保留主类Ollamachat
和配置管理器ConfigManager
- 代码结构按功能拆分为三大模块:
新增功能 ✨
- 智能候选回复系统:
- 新增
SuggestedResponseHandler
实现多模型协同推荐 - 玩家收到AI回复后,自动生成3条可点击的后续提问建议
- 支持通过配置文件启用/禁用:
suggested-responses-enabled: true suggested-response-models: - llama3
- 新增
配置与本地化 🌐
- 语言文件更新:
- 新增候选回复相关词条:
"suggested-responses-header": "§a[OllamaChat] 推荐回复:", "suggested-response-prefix": "§7[点击回复] §f"
- 新增候选回复相关词条:
注意事项:
- ⚠️ 本次更新涉及配置文件结构变更:
- 新增
suggested-responses
配置组 - 建议备份旧配置后重新生成
- 新增
- 🔄 语言文件需删除
lang
目录让插件重新生成 - 💡 候选回复功能默认关闭,需在配置中手动启用
Version 1.1.0
Changes in this Update:
Features:
- Introduced prompt management system, allowing creation, deletion, listing, selection, and clearing of prompts to customize AI interactions.
- Added conversation management system, enabling players to start, switch, delete, and view AI-associated conversations.
- Updated language file format to accommodate new commands and enhance localization support.
- Implemented Tab completion for
/ollamachat
subcommands to improve command usability.
New Commands:
Command | Permission | Description |
---|---|---|
/ollamachat prompt set <promptName> <promptContent> |
ollamachat.prompt.set |
Creates and saves a new prompt to the configuration. |
/ollamachat prompt delete <promptName> |
ollamachat.prompt.delete |
Removes a specified prompt from the configuration. |
/ollamachat prompt list |
ollamachat.prompt.list |
Displays all available prompts with the current default. |
/ollamachat prompt select <promptName> |
ollamachat.prompt.select |
Sets a prompt as the default for AI interactions. |
/ollamachat prompt clear |
ollamachat.prompt.select |
Resets the default prompt to none. |
/ollamachat conversation new <aiName> <convName> |
ollamachat.conversation.new |
Starts a new conversation linked to a specific AI. |
/ollamachat conversation select <aiName> <convName> |
ollamachat.conversation.select |
Switches to an existing conversation for interaction. |
/ollamachat conversation delete <aiName> <convName> |
ollamachat.conversation.delete |
Deletes a specified conversation. |
/ollamachat conversation list <aiName> |
ollamachat.conversation.list |
Shows all conversations for a given AI. |
Notes:
- Please back up your configuration files before upgrading!
- Language files must be deleted to allow the plugin to regenerate them with the updated format.
- If errors occur after upgrading from a previous version, ensure you back up your current configuration, delete the configuration folder, and let the plugin regenerate all files.
版本 1.1.0
本次更新的主要变更:
功能:
- 新增提示词管理系统,支持创建、删除、列出、选择和清除提示词,以定制 AI 交互体验。
- 新增对话管理系统,允许玩家启动、切换、删除和查看与 AI 关联的对话。
- 更新语言文件格式,以支持新命令并优化本地化体验。
- 为
/ollamachat
子命令添加 Tab 补全功能,提升命令输入便捷性。
新命令:
命令 | 权限 | 描述 |
---|---|---|
/ollamachat prompt set <promptName> <promptContent> |
ollamachat.prompt.set |
创建并保存新的提示词到配置文件。 |
/ollamachat prompt delete <promptName> |
ollamachat.prompt.delete |
删除指定的提示词。 |
/ollamachat prompt list |
ollamachat.prompt.list |
列出所有提示词并显示当前默认提示词。 |
/ollamachat prompt select <promptName> |
ollamachat.prompt.select |
将指定提示词设为默认提示词。 |
/ollamachat prompt clear |
ollamachat.prompt.select |
清除当前默认提示词。 |
/ollamachat conversation new <aiName> <convName> |
ollamachat.conversation.new |
创建与指定 AI 关联的新对话。 |
/ollamachat conversation select <aiName> <convName> |
ollamachat.conversation.select |
切换到现有的对话进行交互。 |
/ollamachat conversation delete <aiName> <convName> |
ollamachat.conversation.delete |
删除指定的对话。 |
/ollamachat conversation list <aiName> |
ollamachat.conversation.list |
显示指定 AI 下的所有对话。 |
注意事项:
- 升级前请备份配置文件!
- 必须删除语言文件以让插件按新格式重新生成。
- 若从历史版本升级后出现错误,请备份当前配置,删除插件配置文件夹,让插件重新生成所有文件。
Version 1.0.3
Changes in this Update:
- Feature: Added status bar display for prompt answer generation, showing 0% at start and 100% at completion.
- Feature: Implemented streaming response functionality for testing (Note: Limited practical effect due to Minecraft's native constraints).
- Improvement: Updated
Ollamachat
to apply response prefix only to the first streaming message for cleaner output.
Notes:
- Please back up your configuration files in advance! This update still requires a rebuild of the configuration.
- This update requires deleting the
lang
files so that the plugin can regenerate them.
版本 1.0.3
本次更新的主要变更:
- 功能: 新增了生成提示答案时的状态显示条,显示开始时 0%,完成时 100%。
- 功能: 实现了流式传输功能的测试(注:受 Minecraft 原生限制,此功能几乎无实际表现)。
- 改进: 更新了
Ollamachat
,仅对流式传输的首条消息应用响应前缀,以获得更简洁的输出。
注意事项:
- 请提前备份好配置文件!本次更新仍需重新生成配置。
- 本次更新需删除
lang
文件以让插件重新生成新的语言文件。
Version 1.0.2
Changes in this Update:
- Fix: Resolved an issue with incorrect OpenAI API request formatting that caused request failures.
- Feature: Merged the
feature-chat-history-save-call
branch, adding support for saving and retrieving chat history. - Improvement: Updated related code to ensure compatibility and smooth execution of new features.
Notes:
- Please back up your configuration files in advance!
- This update requires deleting the
lang
files so that the plugin can regenerate them. - If configuration files fail to regenerate after deletion, please submit an issue for assistance; we will address it as soon as possible.
版本 1.0.2
本次更新的主要变更:
- 修复: 修正了 OpenAI API 请求格式错误的问题,该问题曾导致请求失败。
- 功能: 合并了
feature-chat-history-save-call
分支,新增了聊天历史记录保存和调用的支持。 - 改进: 更新了相关代码,确保新功能的兼容性和平稳运行。
注意事项:
- 请提前备份好配置文件!
- 本次更新需删除
lang
文件以让插件重新生成新的语言文件。 - 如果配置文件仍无法再生,请提交Issue,我们将尽快修复相关问题。
Version 1.0.2-rc2
Changes in this Update:
- Added multi-language support for command usage text in
plugin.yml
. - Implemented player conversation history save and call functionality during AI interactions.
- Fixed issues related to configuration file updates.
Notes:
- Please back up your configuration files in advance!
- This update requires deleting the
lang
files so that the plugin can regenerate them. - If configuration files fail to regenerate after deletion, please submit an issue for assistance; we will address it as soon as possible.
Version 1.0.1 New Features:
- Added multi-language support, including the
lang
directory withen.lang
(English) andzh_cn.lang
(Simplified Chinese) language files. - Added
/ollamachat toggle <ai-name>
command to dynamically enable or disable specific AI services. - Added
/aichat <ai-name> <prompt>
command to interact with other AI services.
Improvements:
- Optimized configuration file loading logic to automatically update
config.yml
when configurations do not match, without modifying the original configuration values. - Enhanced error message prompts to support reading messages from language files.
Fixes:
- Fixed issues with language file formatting to ensure compliance with YAML specifications.
- Resolved problems where AI configurations were not properly loaded during plugin config reloads.