AI Assistant Plugin for Minecraft Java Server powered by Google Gemini.
Important: Please read this
README.mdand theconfig.ymlcarefully before using or configuring MinecraftAI. Some features, especially AI command execution, depend on permissions and configuration settings.
MinecraftAI is an AI assistant plugin for Minecraft Java Server. It allows players to interact with an AI directly through Minecraft chat.
MinecraftAI supports multiple chat modes, conversation history, cooldowns, AI-generated Minecraft commands, command whitelisting, and configurable AI behavior.
If you have a question, find a bug, or want to suggest a feature, please make an issue.
- Google Gemini AI Integration
- Chat-based AI Assistant
- Public/Mention/Private Mode
- Conversation History, Limit, and Reset
- AI Command Execution
- Permissions
- Cooldown System
- Player Information Context
- Async AI Requests
- Configuration Support
- Compatible with 7 Server Software (Paper, Spigot, CraftBukkit, Folia, Purpur, Pufferfish, Leaves)
| Version | JAR | Minecraft Support | Software Support |
|---|---|---|---|
| DEV-0.1 | DOWNLOAD | Check release | Paper, Spigot, CraftBukkit, Folia, Purpur, Pufferfish, Leaves |
- Download the latest MinecraftAI release.
- Put the
.jarfile into the server'spluginsfolder. - Start or restart the server.
- Open
plugins/MinecraftAI/config.yml. - Configure your Gemini API key.
- Carefully review the AI command configuration and permissions.
- Restart the server or reload the plugin if supported.
The configuration file is located at:
plugins/MinecraftAI/config.yml
ai:
API_KEY: "YOUR_GEMINI_API_KEY"
model: "gemini-2.5-flash"API_KEY is required for MinecraftAI to communicate with Google Gemini.
API_KEY: "YOUR_GEMINI_API_KEY"Security: Never publish your API key in GitHub, screenshots, logs, or other public places.
Configure the Gemini model used by MinecraftAI:
model: "gemini-2.5-flash"Make sure the model is supported by the Gemini API and your API configuration. Never change it if you don't know what you do.
MinecraftAI stores conversation history for each player.
conversation:
max-messages: 20max-messages controls the maximum number of messages stored in a player's conversation.
When the limit is reached, older messages are removed.
You can also clear your conversation using:
/ai clear
MinecraftAI supports three chat modes.
/ai mode public
In public mode, normal player messages can be sent to the AI.
/ai mode mention
In mention mode, the AI only responds when its configured name is mentioned.
For example, if the AI name is James:
James, what is the weather?
The AI name can be configured in config.yml.
/ai mode private
Private mode allows selected players to interact with the AI privately according to MinecraftAI's private-player system.
MinecraftAI can generate and execute Minecraft commands based on player requests.
For example:
change day
The AI may generate:
/time set day
MinecraftAI then validates the command before executing it.
Important: AI command execution is disabled or restricted unless the required configuration and permission are available.
AI command execution can be configured in config.yml:
ai:
commands:
enabled: true
allowed:
- tp
- give
- kill
- weather
- timeControls whether MinecraftAI is allowed to execute AI-generated commands.
enabled: trueSet it to:
enabled: falseif you do not want MinecraftAI to execute commands.
Defines which Minecraft commands AI is allowed to execute.
Example:
allowed:
- tp
- give
- kill
- weather
- timeOnly commands included in this list can be executed.
For example, if:
allowed:
- time
- weatherthe AI cannot execute:
/give
/tp
/kill
even if it generates those commands.
Important: Only add commands that you trust MinecraftAI to execute. Changing this list directly changes what the AI is allowed to control on your server.
AI command execution requires:
minecraftai.execute
Players without this permission cannot execute AI-generated commands.
The /ai command itself requires:
minecraftai.command
Do not confuse these permissions:
| Permission | Description | Default |
|---|---|---|
minecraftai.command |
Use /ai commands |
OP |
minecraftai.execute |
Allow AI-generated Minecraft commands | OP |
A player can therefore use MinecraftAI without necessarily being allowed to execute AI commands.
| Command | Description | Permission | Default | Console Support |
|---|---|---|---|---|
/ai start |
Start MinecraftAI | minecraftai.command |
OP | NO |
/ai end |
Stop MinecraftAI | minecraftai.command |
OP | NO |
/ai mode <mode> |
Change AI mode | minecraftai.command |
OP | NO |
/ai status |
Show AI status | minecraftai.command |
OP | NO |
/ai clear |
Clear your AI conversation | minecraftai.command |
OP | NO |
| Mode | Description |
|---|---|
public |
AI can respond to normal chat |
mention |
AI responds when its name is mentioned |
private |
AI responds to configured private players |
MinecraftAI messages can be configured through config.yml.
Example:
message:
thinking: "%prefix%&7Thinking..."
no-api-key: "%prefix%&cAPI key has not been configured."
cooldown: "%prefix%&cPlease wait &e%seconds% seconds&c."
error: "%prefix%&cAI Failed to get a response from AI."
response: "%prefix%&f%response%"MinecraftAI supports color codes using:
&
Example:
prefix: "&bJames &8» "Common placeholders include:
| Placeholder | Description |
|---|---|
%prefix% |
Configured AI prefix |
%name% |
AI name |
%response% |
AI response |
%seconds% |
Remaining cooldown time |
%status% |
Current AI status |
%mode% |
Current AI mode |
Check the comments in config.yml for the currently supported placeholders before changing message formats.
MinecraftAI can provide the AI with information about the player and server environment, including:
- Player name
- World
- Location
- Gamemode
- OP status
- AI command permission
- Online player count
- Minecraft time
- Weather
This allows the AI to provide more context-aware responses.
MinecraftAI performs several checks before executing an AI-generated command.
Commands are checked against the configured whitelist.
MinecraftAI also blocks command chaining patterns such as:
;
&&
||
newline
The player must also have:
minecraftai.execute
before an AI-generated command can be executed.
Warning: AI command execution gives the AI the ability to interact with your Minecraft server through the commands you whitelist. Only enable commands that you understand and are comfortable allowing the AI to execute.
IMPORTANT: Always read both this
README.mdand the comments insideconfig.ymlcarefully before deploying MinecraftAI.
Changing configuration values such as:
ai.commands.enabled
ai.commands.allowed
ai.conversation.max-messagescan directly affect how MinecraftAI behaves on your server.
In particular, adding commands to:
ai.commands.allowedcan give the AI permission to perform those commands for players who have:
minecraftai.execute
Do not add commands to the whitelist without understanding their effects.
If you find a bug, have a question, or want to request a feature, please create an issue.
See the repository for license information.
Developed by Kylan1940.
- GitHub: Kylan1940
- MinecraftAI: GitHub Repository