/
This release reintroduces HikariCP for enhanced MySQL database performance and adds a public API for other plugins to interact with OllamaChat's AI chat functionality. It focuses on improving database efficiency, extensibility, and developer integration while maintaining compatibility with existing configurations.
config.yml under database.mysql.hikari for tuning connection pool parameters (e.g., maximum-pool-size, connection-timeout).OllamaChatAPI interface (com.ollamachat.api.OllamaChatAPI) for other plugins.sendAIQuery, createConversation, and listConversations.API.md for developer integration.DatabaseManager to leverage HikariCP for MySQL connections, while preserving SQLite functionality.DependencyLoader to include HikariCP (version 5.1.0) alongside MySQL and SQLite JDBC drivers, downloaded at runtime to plugins/OllamaChat/libs.compileOnly in build.gradle for non-Paper dependencies to minimize JAR size.database.mysql.hikari section to config.yml with default settings for connection pooling.config.yml comments for clarity and ease of use.Plugin ollamaPlugin = getServer().getPluginManager().getPlugin("OllamaChat");
if (ollamaPlugin != null && ollamaPlugin.isEnabled()) {
OllamaChatAPI api = ((com.ollamachat.core.Ollamachat) ollamaPlugin).getAPI();
api.sendAIQuery(player, "ollama", "Hello, how are you?")
.thenAccept(response -> player.sendMessage("AI Response: " + response));
}
database:
type: mysql
mysql:
host: localhost
port: 3306
database: ollamachat
username: root
password: ""
hikari:
maximum-pool-size: 10
connection-timeout: 30000
config.yml to include the database.mysql.hikari section if using MySQL. Default values are added automatically.config.yml before updating to avoid data loss.HikariCP-5.1.0.jar in plugins/OllamaChat/libs.libs folder to force re-download if dependencies are corrupted.OllamaChat using OllamaChatAPI. Add softdepend: [OllamaChat] to plugin.yml and refer to API.md./ollamachat conversation new) to verify MySQL/SQLite functionality.本次更新重新引入HikariCP以提升MySQL数据库性能,并新增公共API供其他插件与OllamaChat的AI聊天功能交互。重点改进数据库效率、可扩展性和开发者集成,同时保持与现有配置的兼容性。
config.yml的database.mysql.hikari下可配置连接池参数(如maximum-pool-size、connection-timeout)OllamaChatAPI接口(com.ollamachat.api.OllamaChatAPI)sendAIQuery、createConversation、listConversations等方法)API.mdDatabaseManager以使用HikariCP管理MySQL连接,同时保留SQLite功能DependencyLoader包含HikariCP(5.1.0版)及MySQL/SQLite驱动,运行时下载至plugins/OllamaChat/libsbuild.gradle中非Paper依赖使用compileOnly以减小JAR体积config.yml新增database.mysql.hikari配置段Plugin ollamaPlugin = getServer().getPluginManager().getPlugin("OllamaChat");
if (ollamaPlugin != null && ollamaPlugin.isEnabled()) {
OllamaChatAPI api = ((com.ollamachat.core.Ollamachat) ollamaPlugin).getAPI();
api.sendAIQuery(player, "ollama", "你好吗?")
.thenAccept(response -> player.sendMessage("AI回复: " + response));
}
database:
type: mysql
mysql:
host: localhost
port: 3306
database: ollamachat
username: root
password: ""
hikari:
maximum-pool-size: 10
connection-timeout: 30000
config.yml添加hikari配置段(默认值会自动生成)plugins/OllamaChat/libs目录libs文件夹强制重新下载OllamaChatAPI集成,在plugin.yml添加softdepend: [OllamaChat]并参考API.md/ollamachat conversation new命令)
A versatile Minecraft plugin that integrates Ollama and OpenAI-class APIs, providing multi-language support, real-time AI interactions, and advanced prompt and conversation management for immersive in-game experiences.