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.
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:
features.yml: This new file contains all feature-related settings, including:
This system provides granular control over conversation history, balancing AI context with server performance.
/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
/ai cache clear (Clears your own session)/ai cache clear <playername> (Clears a specific player's session)/ai cache clear all (Clears all online players' sessions)/ai cache refresh
/ai cache refresh (Reloads your own session)/ai cache refresh <playername> (Reloads a specific player's session)/ai cache refresh all (Reloads all online players' sessions)/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)
summarieschat/. If an old summary existed, it's archived into the main chat log. The AI's short-term memory is then cleared./ai memory clear (Summarizes and ends your own session)/ai memory clear <playername> (Summarizes and ends a specific player's session)/ai memory clear all (Summarizes and ends all online players' sessions)/ai memory refresh (Summarize and Continue Session)
/ai memory refresh (Summarizes and continues your own session)/ai memory refresh <playername> (Summarizes and continues a specific player's session)/ai memory refresh all (Summarizes and continues all online players' sessions)Important Notes on AI-Powered Memory:
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.
plugins/NSR-AI/playerchatshistory/plugins/NSR-AI/adminchatshistory/plugins/NSR-AI/summarychat//ai cache clear/refresh and /ai memory clear/refresh for themselves.all require the user to be in admin mode.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:
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.
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 data commands, 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 add command:
/ai add <keyword>, <message_content>message_content.Robust /ai data command:
/ai data queries, the plugin will now fall back to manually searching the local knowledge base and displaying relevant headings or content.Configurable Knowledge Base Output Color:
chat-colors.knowledge-base in features.yml to customize the color of knowledge base output.This section details the very latest features and improvements:
Symmetric add and remove commands: 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 all Command: 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 to features.yml. This setting controls the confirmation method for adding new knowledge entries:
simple-knowledge-yml-approve is set to false (default), the plugin will continue to provide a unique confirmation code that the admin must use with /ai confirm <code>.simple-knowledge-yml-approve is set to true, the plugin will simplify the confirmation process, requiring the admin to type /ai confirm yes to approve the addition.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 data and /ai data all commands. When set to false, players will be unable to use these commands to query the knowledge base. (Default: true)command-toggles.admin: Controls the /ai admin command, which is used to toggle administrator mode. When set to false, administrators cannot use this command. (Default: true)command-toggles.disable: Controls the /ai disable command, used to disable admin mode. When set to false, 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 to false, players cannot check the plugin's version. (Default: true)command-toggles.add: Controls the /ai add command, used by administrators to add new entries to the knowledge base. When set to false, this command is unusable. (Default: true)command-toggles.add-confirm: Controls the confirmation step for the /ai add command.
true (default), administrators will be prompted to confirm the addition of a knowledge entry (either with a code or /ai confirm yes).false, knowledge entries added via /ai add will be instantly saved without requiring a separate confirmation step.command-toggles.remove: Controls the /ai remove command, used by administrators to remove entries from the knowledge base. When set to false, this command is unusable. (Default: true)command-toggles.remove-confirm: Controls the confirmation step for the /ai remove command.
true (default), administrators will be prompted to confirm the removal of a knowledge entry (either with a code or /ai confirm yes).false, knowledge entries removed via /ai remove will be instantly deleted without requiring a separate confirmation step.command-toggles.memory-clear: Controls the /ai memory clear command. When set to false, this command is unusable. (Default: true)command-toggles.memory-refresh: Controls the /ai memory refresh command. When set to false, this command is unusable. (Default: true)command-toggles.cache-clear: Controls the /ai cache clear command. When set to false, this command is unusable. (Default: true)command-toggles.cache-refresh: Controls the /ai cache refresh command. When set to false, this command is unusable. (Default: true)/ai reload CommandThis update significantly expands the functionality of the /ai reload command, providing more granular control over plugin reloads:
/ai reload (default): Reloads the main config.yml./ai reload c or /ai reload config: Reloads only the main config.yml./ai reload f or /ai reload features: Reloads only the features.yml./ai reload k or /ai reload knowledge: Reloads only the knowledge base./ai reload nsr-ai: Reloads the entire plugin (configs and knowledge base)./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 in features.yml and accessible to the player (admin commands are only shown to administrators)./ai without any arguments now defaults to displaying this help message, making it easier for users to discover available commands./ai commands, suggesting sub-commands and arguments based on context and enabled features./ai privacy):
/ai privacy <feature> [on|off] to manage their own privacy settings without being prompted for a player name./ai privacy <player> <feature> [on|off] to manage other players' privacy, or /ai privacy <feature> [on|off] to manage their own.health, hunger, etc.) and on/off options is now available./ai stats command 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)").1.0.2.The knowledge base search has been significantly improved to provide more accurate and relevant results.

Gemini + ChatGPT Powered AI Chat for Minecraft: Fast, Smart & Server-Friendly