NSR-AI v1.2-pre - Pet Emotional Communication System!
Get ready to connect with your beloved Minecraft pets like never before! Version 1.2 of NSR-AI introduces the Pet Emotional Communication System, a revolutionary feature that brings your tamed companions to life with unique personalities, moods, and the ability to chat with you.
๐พ Pet System
Pet Linking & Nicknames
- Link Your Pets: Use the
/ai pet tamecommand while looking at a tamed and named pet to link it to the AI. This will allow your pet to start communicating with you. - Unique Nicknames: Give your pets a special nickname with
/ai pet nickname <nickname>. Each pet's nickname must be unique!
Advanced AI-Powered Chat
- Real Conversations: Your pets now have their own AI-powered brain! They will respond to your messages with unique and in-character dialogue.
- Emotional Intelligence: A pet's mood and its bond with you will directly affect its personality. A happy pet with a strong bond will be affectionate and playful, while a neglected pet might be cold and distant.
- Species-Specific Identity: Every pet type has its own unique sound and set of emojis! Wolves will "woof," cats will "meow," and their messages will be full of personality.
- Check Your Pet's Mood: Ask your pet "what is your mood" or "how are you feeling" to get a direct response about its current mood.
New Commands
/ai pet list: See a list of all your linked pets and their status./ai pet info <pet_name>: Get detailed information about a specific pet, including its mood, bond level, and more.
Pet Lifecycle
- Tamed & Linked Dates: Your pet now remembers when it was tamed and when it was linked to the AI. Ask them about it!
- A Pet's Farewell: When a pet is low on health, it will say a heartfelt goodbye. When a pet dies, its link with the AI is broken. If you try to talk to a pet that has passed away, it will respond with a special message.
Ownership
- A Special Bond: Only a pet's true owner can chat with it and change its nickname. Any other player who tries to interact with your pet will be ignored or receive a cold shoulder.
๐ Per-Player API Keys
- Bring Your Own Key: Players can now add their own API keys for Gemini, OpenAI, or Claude using the
/ai apikeycommand. - Session-Based: Player-provided API keys are only valid for the current session and are never stored on the server.
- Secure: API keys are not visible to admins or in the console.
- Fallback System: If a player has not provided their own API key, the server's global API key will be used as a fallback.
New Commands
/ai apikey: then type the key in the chat to add a temporary API key for your session./ai apikey list: View your active session keys (masked for security)./ai apikey clear: Remove all your active session keys.
๐ How to Get Started
- Tame a Pet: Tame a wolf, cat, or any other supported animal in Minecraft.
- Give it a Name: Use a nametag to give your new companion a name.
- Link to the AI: Look at your pet and type
/ai pet tame. - Give it a Nickname: Use
/ai pet nickname <nickname>to give your pet a unique nickname. - Start Chatting! Mention your pet's name or nickname in the chat to start a conversation.
We are incredibly excited for you to try out the new Pet Emotional Communication System and form a deeper bond with your furry (and feathery) friends!
๐ก๏ธ Automatic Security & Bug Fixer Downloader
NSR-AI now includes a robust, automated system to keep your plugin secure and up-to-date with the latest bug fixes. This system operates silently in the background, ensuring your server benefits from continuous improvements and protection without manual intervention for updates.
How it Works:
- Automatic Security Updates: The plugin periodically checks for updates to its security module. If a new version is available, it will be automatically downloaded and reloaded, ensuring your server always has the latest protections.
- Automated Bug Fixes: The plugin also periodically checks for critical bug fixes for the main plugin. If a new bug fix is available, it will be automatically downloaded.
- Intelligent Version Tracking: A dedicated
bug.txtfile tracks the installed bug-fix version, preventing redundant downloads and ensuring efficient updates. - Server Restart for Main Plugin Updates: For bug fixes that involve changes to the main plugin's core code, a server restart will be required to fully apply the update. The plugin will clearly notify you in the console when a restart is needed.
- Transparent Logging: The system provides clear log messages in your server console, informing you about update checks, downloads, and when a restart is required.
This ensures your NSR-AI experience is always stable, secure, and running the latest enhancements.
NSR-AI v1.1 - Comprehensive Update
This update introduces significant improvements to configuration management, and a powerful, multi-layered system for handling conversation history, designed for optimal performance and user control.
Configuration Split
For better organization and easier management, the plugin's configuration has been split into two distinct files:
-
config.yml: This file now contains the core settings for the plugin, such as:- Admin activation code
- Default AI models (Gemini, Claude, OpenAI)
- Default API provider
- API keys
-
features.yml: This new file contains all feature-related settings, including:- Chat colors for the AI and users
- Customizable messages for various events (e.g., API errors, permission denied)
- The system prompt for the AI
- Conversation history length
- Chat prefixes for AI and users
- Code blocker settings
Advanced Memory & Caching System
This system provides granular control over conversation history, balancing AI context with server performance.
1. Simple Session Caching (/ai cache)
These commands offer quick control over a player's active chat session without involving AI processing. They are ideal for fast resets.
-
/ai cache clear- Action: Instantly clears the AI's short-term memory for the specified target.
- Result: The next message will start a completely fresh conversation.
- Usage:
- Player:
/ai cache clear(Clears your own session) - Admin:
/ai cache clear <playername>(Clears a specific player's session) - Admin:
/ai cache clear all(Clears all online players' sessions)
- Player:
-
/ai cache refresh- Action: Reloads the most recent conversation from the long-term log files back into the AI's short-term memory for the specified target.
- Result: Allows continuation of a conversation that was previously cleared.
- Usage:
- Player:
/ai cache refresh(Reloads your own session) - Admin:
/ai cache refresh <playername>(Reloads a specific player's session) - Admin:
/ai cache refresh all(Reloads all online players' sessions)
- Player:
2. AI-Powered Memory (/ai memory)
This advanced feature uses AI to summarize and compress long conversations, enabling a nearly infinite memory while optimizing resource usage.
-
/ai memory clear(Summarize and End Session)- Action: The AI summarizes the current conversation history, and then the session is ended.
- Process: The generated summary is saved to
summarieschat/. If an old summary existed, it's archived into the main chat log. The AI's short-term memory is then cleared. - Use Case: To "bank" important information from a conversation as a summary before starting a new topic.
- Usage:
- Player:
/ai memory clear(Summarizes and ends your own session) - Admin:
/ai memory clear <playername>(Summarizes and ends a specific player's session) - Admin:
/ai memory clear all(Summarizes and ends all online players' sessions)
- Player:
-
/ai memory refresh(Summarize and Continue Session)- Action: The AI summarizes the current conversation history, and then replaces the detailed history with the summary, allowing the conversation to continue.
- Process: The AI's short-term memory is replaced with a single system message containing the new summary.
- Result: This frees up memory while allowing the AI to "remember" the context of the prior conversation in a compressed form, enabling very long and detailed interactions.
- Use Case: To optimize memory during long, complex conversations without losing context.
- Usage:
- Player:
/ai memory refresh(Summarizes and continues your own session) - Admin:
/ai memory refresh <playername>(Summarizes and continues a specific player's session) - Admin:
/ai memory refresh all(Summarizes and continues all online players' sessions)
- Player:
Important Notes on AI-Powered Memory:
- API Usage: These commands will make calls to the AI API for summarization, incurring usage costs.
- Time: Summarization is a complex task and may take a few moments to complete. These operations are asynchronous to prevent server lag.
Persistent Chat Logging
All conversations and generated summaries are automatically saved to disk, ensuring no chat history is lost. This process is asynchronous to maintain high server performance.
- Log Locations:
- Regular chats:
plugins/NSR-AI/playerchatshistory/ - Admin-mode chats:
plugins/NSR-AI/adminchatshistory/ - Latest summaries:
plugins/NSR-AI/summarychat/
- Regular chats:
Permissions
- Player Commands: Any player can use
/ai cache clear/refreshand/ai memory clear/refreshfor themselves. - Admin Commands: Commands targeting other players or
allrequire the user to be in admin mode.
New Features Added to NSR-AI Plugin
This update introduces several enhancements to the NSR-AI plugin, focusing on improved user experience and maintainability:
-
Automatic Update Checker: The plugin now includes an integrated update checker that automatically verifies if you are running the latest version upon startup. This helps ensure you always have access to the newest features and bug fixes.
-
New In-Game Version Command: A new command,
/ai version(or/ai v), has been added. Players can use this command to:- View the current version of the plugin.
- See if their plugin is up-to-date or if a newer version is available.
- Access a list of features included in the latest available version.
-
Outdated Version Notifications: If your plugin is outdated, the server console will display a clear notification. Additionally, administrators will receive in-game messages with direct links to download the latest version from official platforms like Modrinth, SpigotMC, and Polymart.
-
Cloudflare Worker Integration: The update checking mechanism is powered by a Cloudflare Worker, ensuring efficient and reliable version verification.
-
Enhanced Plugin Startup Message: The plugin now features a more visually engaging startup message in the server console, presenting the plugin's name, version, and developer information in a clear and formatted manner.
Recent Feature Enhancements
This section outlines the latest additions and improvements to the NSR-AI plugin:
-
Enhanced Command Set:
/ai admin <activation_code>: A fully functional command to toggle administrator mode, allowing access to privileged commands./ai data <query>: This command now specifically queries the local knowledge base for answers, reducing reliance on external AI APIs for known information./ai add <keyword> <heading> <response>: Allows administrators to add new entries to the plugin's knowledge base directly in-game./ai remove <keyword>: Allows administrators to remove entries from the knowledge base directly in-game./ai reload: Enables administrators to reload the plugin's configuration without restarting the server.
-
API Load Reduction: Implemented a strategy to prioritize responses from the local knowledge base for
/ai datacommands, significantly reducing calls to external AI APIs and minimizing the "model overloaded" issues. -
Improved Plugin Lifecycle Messages: The
onDisable()message in the server console now provides more informative feedback, indicating whether the plugin disabled gracefully or due to errors. -
Enhanced
/ai addcommand:- New command structure:
/ai add <keyword>, <message_content> - AI-generated headings for knowledge base entries based on
message_content. - Preview of the knowledge entry (AI-generated heading and message to be saved) displayed to the admin before confirmation.
- New command structure:
-
Robust
/ai datacommand:- If the AI API call fails for
/ai dataqueries, the plugin will now fall back to manually searching the local knowledge base and displaying relevant headings or content.
- If the AI API call fails for
-
Configurable Knowledge Base Output Color:
- New setting
chat-colors.knowledge-baseinfeatures.ymlto customize the color of knowledge base output.
- New setting
New Features (from latest update)
This section details the very latest features and improvements:
-
Symmetric
addandremovecommands: When an admin removes data using/ai remove <keyword>, the plugin now displays the content of the removed entry, providing clear confirmation of the action. -
Improved Knowledge Base Search (
/ai data <query>): The/ai data <query>command has been significantly enhanced. It now searches not only the headings but also the answers (content) within the knowledge base. If a single, clear match is found, the answer is displayed directly. If multiple matches are found, the user is prompted to refine their query for more specific results. -
Direct Search Results Display: When a clear match is found using
/ai data <query>, the plugin now directly displays the answer from the knowledge base, rather than just the heading. -
Cleaned-up Heading Display: When adding new knowledge entries, the "Heading (AI-generated):" prefix in the preview message has been removed for a cleaner and more concise output.
-
New
/ai data allCommand: A new command,/ai data all, has been introduced. This command allows administrators to view all entries currently stored in the knowledge base, including both their headings and content. -
Configurable Knowledge Confirmation: A new setting,
simple-knowledge-yml-approve, has been added tofeatures.yml. This setting controls the confirmation method for adding new knowledge entries:- If
simple-knowledge-yml-approveis set tofalse(default), the plugin will continue to provide a unique confirmation code that the admin must use with/ai confirm <code>. - If
simple-knowledge-yml-approveis set totrue, the plugin will simplify the confirmation process, requiring the admin to type/ai confirm yesto approve the addition.
- If
Granular Command Toggles
This update introduces a highly granular command toggling system, allowing server administrators precise control over individual AI commands directly from the features.yml configuration file. Each command or command-related function can now be independently enabled or disabled.
command-toggles.data: Controls the/ai dataand/ai data allcommands. When set tofalse, players will be unable to use these commands to query the knowledge base. (Default:true)command-toggles.admin: Controls the/ai admincommand, which is used to toggle administrator mode. When set tofalse, administrators cannot use this command. (Default:true)command-toggles.disable: Controls the/ai disablecommand, used to disable admin mode. When set tofalse, this command cannot be used. (Default:true)command-toggles.version: Controls the/ai version(and/ai v) command, which displays plugin version information. When set tofalse, players cannot check the plugin's version. (Default:true)command-toggles.add: Controls the/ai addcommand, used by administrators to add new entries to the knowledge base. When set tofalse, this command is unusable. (Default:true)command-toggles.add-confirm: Controls the confirmation step for the/ai addcommand.- If
true(default), administrators will be prompted to confirm the addition of a knowledge entry (either with a code or/ai confirm yes). - If
false, knowledge entries added via/ai addwill be instantly saved without requiring a separate confirmation step.
- If
command-toggles.remove: Controls the/ai removecommand, used by administrators to remove entries from the knowledge base. When set tofalse, this command is unusable. (Default:true)command-toggles.remove-confirm: Controls the confirmation step for the/ai removecommand.- If
true(default), administrators will be prompted to confirm the removal of a knowledge entry (either with a code or/ai confirm yes). - If
false, knowledge entries removed via/ai removewill be instantly deleted without requiring a separate confirmation step.
- If
command-toggles.memory-clear: Controls the/ai memory clearcommand. When set tofalse, this command is unusable. (Default:true)command-toggles.memory-refresh: Controls the/ai memory refreshcommand. When set tofalse, this command is unusable. (Default:true)command-toggles.cache-clear: Controls the/ai cache clearcommand. When set tofalse, this command is unusable. (Default:true)command-toggles.cache-refresh: Controls the/ai cache refreshcommand. When set tofalse, this command is unusable. (Default:true)
Enhanced /ai reload Command
This update significantly expands the functionality of the /ai reload command, providing more granular control over plugin reloads:
/ai reload(default): Reloads the mainconfig.yml./ai reload cor/ai reload config: Reloads only the mainconfig.yml./ai reload for/ai reload features: Reloads only thefeatures.yml./ai reload kor/ai reload knowledge: Reloads only the knowledge base./ai reload nsr-ai: Reloads the entire plugin (configs and knowledge base).
New /ai help Command
/ai help: Displays a concise help message with descriptions for all available commands. This message dynamically adjusts to show only commands that are enabled infeatures.ymland accessible to the player (admin commands are only shown to administrators).- Typing
/aiwithout any arguments now defaults to displaying this help message, making it easier for users to discover available commands. - Tab Completion: The plugin now supports intelligent tab completion for
/aicommands, suggesting sub-commands and arguments based on context and enabled features.
Addon Enhancements
- Backward Compatibility:
- The addon now supports both NSR-AI plugin version 1.1 and lower versions. This is achieved through a robust compatibility layer that uses reflection to adapt to different API versions at runtime.
- Enhanced Privacy Command (
/ai privacy):- Non-Admins: Can now use
/ai privacy <feature> [on|off]to manage their own privacy settings without being prompted for a player name. - Admins: Can use
/ai privacy <player> <feature> [on|off]to manage other players' privacy, or/ai privacy <feature> [on|off]to manage their own. - Improved Tab Completion: Basic tab completion for privacy features (
health,hunger, etc.) andon/offoptions is now available.
- Non-Admins: Can now use
- Player Data Initialization:
- The addon now ensures that player data is correctly initialized and saved when a player joins the server for the first time, preventing "no data" issues for new players.
- Detailed AFK Time Display:
- The
/ai statscommand now provides more detailed information for AFK status, displaying the duration a player has been AFK in minutes, seconds, hours, or days (e.g., "Yes (1h 30m)").
- The
- Version Update:
- The addon's internal version has been updated to
1.0.2.
- The addon's internal version has been updated to
Advanced Knowledge Base Search
The knowledge base search has been significantly improved to provide more accurate and relevant results.
- Relevance-Based Scoring: The search now uses a relevance scoring system to rank search results. This ensures that the most relevant entries are prioritized.
- Content and Heading Search: The search now looks for matches in both the heading and the content of the knowledge base entries, providing more comprehensive results.
- Weighted Headings: Matches found in the heading are given a higher weight, as they are more likely to be relevant.
- Fuzzy Search: The search is now more tolerant of "irregular syntax" by splitting the query into individual words and searching for each word.
- Top 5 Results: The search returns the top 5 most relevant results, making it easier for users to find the information they need.



