NSR-AI icon

NSR-AI -----

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




NSR-AI v1.4 — The Developer Empowerment Update

NSR-AI v1.4 is the most significant update for developers and server owners to date. This release transforms NSR-AI from a standalone tool into a full-fledged Development Platform — featuring a completely rebuilt programmatic API, granular AI controls, a powerful chat interception layer, and deep stability hardening across every system in the codebase. Whether you're a server admin who wants plug-and-play reliability, or a developer building on top of NSR-AI, this update delivers.

----------------------------------------------------​

Quick Summary

Area What's New
New Features Privacy system, Pet API, session control, command routing, middleware, and more
Bug Fixes Several critical, security, pet, and engine stability fixes
Optimization Major RAM reduction, CPU hardening, and full codebase consolidation
Developer API Builder-pattern registration, async futures, interceptors, RAG access


----------------------------------------------------​

Jump To Section

New Features · Bug Fixes & Stability · Performance & Optimization · Developer API

----------------------------------------------------​

New Features

⚡ Asynchronous High Performance
NSR-AI v1.4 completely decouples the AI engine from the Minecraft main thread, keeping your server running smoothly at all times.

  • Zero-Lag AI Requests: askAI and sendMsg now run entirely in the background — your server stays at 20 TPS even during complex AI reasoning.
  • Async Persistence: Saving AI logs via SaveMsg or updating the Knowledge Base no longer causes disk lag or server hiccups.
  • Future-Ready API: All critical paths now use CompletableFuture, giving developers precise control over when to handle AI responses without blocking the game thread.

----------------------------------------------------​

Chat Interception System (Middleware)
NSR-AI 1.4 introduces a powerful Interceptor System that allows addons to sit between the player and the AI, enabling custom processing at every stage of a conversation.

Middleware Capabilities
Addons can now register an AIInterceptor to:
  • Read & Edit Player Input — Modify what the player says before it reaches the AI.
  • Read & Edit AI Response — Transform the AI's answer (e.g. add branding or filter content) before the player sees it.
  • Cancel Interactions — Block specific inputs or responses based on custom logic (e.g. filtering bad words or enforcing game rules).

Knowledge Base Bridge (RAG Access)
  • Programmatic Access: Addons can now query and mutate the knowledge.yml store directly.
  • Hierarchical Permissions: read-knowledge and edit-knowledge nodes control access globally and per-addon.
  • Addon Identification: The core plugin now uses stack-trace analysis to verify which addon is making an API call, preventing unauthorized knowledge tampering.

Smart System Prompt Injection
  • Core Context Extension: Addons can use the onSystemPrompt interceptor to append dynamic instructions to the /ai global system prompt.
  • API Isolation: When an addon calls askAI or sendMsg, the core NSR-AI system prompt is bypassed, allowing the addon to supply its own pure system instructions.

Universal Command Routing (/aia)
  • Addon Namespace: Commands are now routed via /aia <AddonName>, keeping /ai exclusively for core features.
  • Tab Completion Delegation: The core plugin handles the first argument (addon list) and then delegates all subsequent arguments and tab suggestions to the target addon.
  • SimpleAddon Builder: Enhanced to support .onTabCompleteHandler() for rapid development.

Integrated Pet System API
  • AIPet Data Model: Addons can now programmatically access pet details (Name, Mood, Bond, Level, Hunger, etc.).
  • Dynamic Manipulation: New API methods allow addons to change a pet's mood, bond, or level on the fly — perfect for RPG or training addons.
  • Status Interrogation: Fetch a list of all pets owned by a player to display in custom GUIs or menus.

----------------------------------------------------​

️ Advanced Permission Architecture
With great power comes great responsibility. NSR-AI 1.4 adds a multi-layered permission system to keep your server secure.

  • Global Master Switch: A central permissions.yml allows admins to disable chat reading or editing for all addons at once.
  • Automatic Per-Addon Folders: NSR-AI automatically creates a dedicated folder and permissions.yml for every registered addon.
  • Granular Permissions: Control exactly what each addon can do — read-player-input, edit-ai-response, cancel-player-input, and more.

----------------------------------------------------​

Smart AI Routing
The internal engine has been upgraded with intelligent routing logic that handles multi-provider setups seamlessly.

  • Provider Sovereignty: Automatically detects whether a key is Gemini, Claude, or OpenAI and formats the request perfectly for each provider.
  • Dual-Mode Intelligence: Automatically switches between Player API keys and Global Fallback keys based on developer requirements.
  • Thread-Safe Memory: Shared memory and conversation histories are now handled with full thread-safety, ensuring data integrity during async operations.

----------------------------------------------------​

Advanced Session & Memory Control
Developers now have granular control over how the AI remembers and forgets across conversations.

  • Summarize Chats: Compress long conversations into a summary that the AI retains in its memory.
  • Cache Refresh / Clear: Manually reload a conversation session from disk or wipe it entirely for a fresh "clean slate."
  • Memory Access: Programmatically read, update, or clear the AI's long-term summaries for each player.
  • Shared Memory Store: A global key-value store that allows different addons to share context with each other.

----------------------------------------------------​

️ Flexible Component Reloading
You no longer have to reload the entire plugin for a small change. The new API supports targeted reloads for any component:

Mode What It Reloads
FULL Everything
CONFIG config.yml only
KNOWLEDGE RAG knowledge base only
FEATURES Feature toggles only


----------------------------------------------------​

⚡ Dynamic Model & Provider Control
Take full control over the AI engine programmatically, without ever restarting the server.

  • Global Swapping: Change the server's default model or API provider (Gemini, OpenAI, Claude) on the fly via the API.
  • Per-Request Overrides: Addons can specify a different model or provider for a specific request without affecting global settings — perfect for complex tasks that require a "Pro" model.

----------------------------------------------------​

️ Structured Addon Command Aliases
NSR-AI 1.4 overhauls how addons integrate commands into the server, providing a clean, collision-free namespace.

  • Dedicated Namespace: Addons use /aia, leaving /ai exclusively for core plugin features.
  • Custom Aliases: Every addon can define a short "Main Command" alias (e.g. /aia aps).
  • Deep Tab Completion: Addon aliases are automatically suggested, and sub-commands are fetched directly from the addon for a professional, native feel.
  • Collision-Free Routing: Commands are routed based on aliases, preventing multiple addons from conflicting with each other.

[HR][/hr]

️ Privacy & Anonymization (Opt-In / Opt-Out)
NSR-AI 1.4 introduces a robust privacy layer that gives players full control over their data.

  • Privacy Mode (Opt-In): Players can use /ai opt in to enable maximum privacy. This swaps sensitive information (like Player Names and IPs) with random codes (e.g. PlayerNameR2d13n) before sending data to the AI. It also blocks all addon and plugin access to the player's chat, preventing any middleware from reading or editing their AI interactions.
  • Normal Mode (Opt-Out — Default): By default, NSR-AI uses real names and allows registered addons to process messages normally, ensuring maximum compatibility with AI extensions.
  • New Command: /ai opt <in|out> allows players to toggle between modes instantly.

----------------------------------------------------​

V1 Legacy Support & Clean-up
To ensure a smooth transition from older versions, NSR-AI v1.4 retains 100% backward compatibility for all core chat addons from v1.2 and v1.3 ( AIMessage & AIResponse systems).

----------------------------------------------------​

Bug Fixes & Stability

NSR-AI 1.4 has been hardened with several critical stability and security fixes across all major systems.

Critical Fixes
  • Addon Unload Loop: Fixed a critical bug where only the first addon was unloaded during /ai reload. All other addons remained as ghost instances in memory, causing duplicates, memory leaks, and unpredictable behavior after every reload.
  • API Key Selection Ignored Overload: The key rotation system had broken logic that could return a rate-limited key back to the caller, causing 429 Too Many Requests errors to cascade to players. Now properly consults the OverloadedKeyManager before selecting a key.
  • API Key Leaked in Logs: When a global API key was rate-limited, the full raw key was printed to the server console — a serious security vulnerability. Now only the last 4 characters are shown (e.g. ***a1b2).
  • Plugin/Addon Registration Bypass: registerPlugin() and registerAddon() accepted any plugin or addon without checking the security ban list, allowing a banned addon to bypass restrictions by registering programmatically. Both methods now validate against SecurityManager before granting access.

----------------------------------------------------​

️ Privacy & Security
  • Smart Anonymization: Fixed a bug where names could be partially replaced (e.g. "Bob" inside "Bobby"). Now uses Regex word boundaries to ensure only exact name matches are anonymized.
  • Robust De-anonymization: Added case-insensitive matching for privacy codes to ensure AI responses are always correctly converted back to real player names.
  • IP Protection: Hardened IP detection logic to prevent data leaks to external AI providers.
  • Plugin-Level Banning: Added validatePlugin() to SecurityManager so entire Bukkit plugins (not just addons) can be banned. The API bridge is severed at runtime with a clear log warning, and the fix is fully backward compatible with older security JARs.

----------------------------------------------------​

Pet System Robustness
  • Fixed Immortal Pets: Pets now correctly lose health when damaged. Fixed a logic error where health was reset to max every game tick.
  • Dynamic Hunger & Health: Pet status bars are no longer stuck at full. Hunger now decreases over time, and pets only regenerate health if well-fed (Hunger > 80).
  • NPE Prevention: Added safeguards for unsupported entity types and pets without nicknames, preventing console errors during pet interactions.

----------------------------------------------------​

⚙️ Core Engine Stability
  • Thread-Safe Memory: Migrated conversation history to CopyOnWriteArrayList to prevent ConcurrentModificationException during asynchronous AI processing.
  • Thinking Animation Safety: Added null-checks to the thinking animation system to handle player disconnections gracefully.
  • Task Management: Optimized background tasks to prevent task accumulation during plugin reloads.
  • ChatLogger Null Guard: Fixed a NullPointerException crash when chat logging was disabled in config but players were actively chatting.
  • Knowledge Base Save Fix: Fixed a data corruption bug where the knowledge base could become unreadable after saving if any keyword contained dots or special YAML characters. Entries are now written individually with proper YAML path notation.
  • Player Quit Cleanup: Removed a duplicate clearApiKeys() call that was causing unnecessary overhead on player disconnect.

----------------------------------------------------​

⚡ Performance & Optimization

⚡ API Infrastructure Stabilization (The GitHub Transition)
Due to significant usage spikes observed recently, we have overhauled our update and security infrastructure to ensure 100% uptime and reliability.
  • Cloudflare to GitHub Migration: The update and security fetch engine has been migrated from dynamic Cloudflare Workers to a high-performance, static GitHub-hosted manifest architecture.
  • Unified Fetch Logic: The plugin now performs a single, consolidated fetch for all versioning, security, and bugfix data, drastically reducing network overhead and preventing request-related throttles.
  • Local Filtration Engine: Implemented client-side version matching for bug fixes. The plugin now downloads the global manifest and identifies relevant patches locally, removing server-side processing dependencies.

Core Infrastructure Hardening
  • Runtime Security Bridge: Implemented validatePlugin and validateAddon in SecurityManager. Banned plugins are now disconnected at registration time, preventing unauthorized API access.
  • Thread Safety Overhaul: Converted all critical plugin maps (admin status, cooldowns, shared memory) to ConcurrentHashMap to prevent ConcurrentModificationException during async API operations.
  • API Reliability: Fixed "dummy" retry logic — the plugin now properly attempts 3 retries with exponential backoff for failed AI requests.
  • Personal API Key Privacy: Added hooks to PlayerListener to respect privacy settings — players who opt out of privacy will no longer have their chat logged by the global ChatLogger.
  • Manager Stability:
    • PlayerDataManager: Fixed unsafe inventory casting and added default value safety for all player stats.
    • ApiKeyManager: Fixed Claude/OpenAI validation endpoints (now uses POST for Claude and /v1/models for OpenAI).
    • ConversationManager: Fully converted to CopyOnWriteArrayList for consistent thread-safe history management.
  • Shutdown Persistence: Added explicit save calls in onDisable for Knowledge Base and Saved Chats to ensure zero data loss during server restarts.

----------------------------------------------------​

Utility & Performance Optimization
  • Massive Masking Optimization: Refactored ChatLogger key masking to eliminate an O(N×M) bottleneck. The logger no longer scans every player's key for every message — it now targets only relevant keys, drastically reducing CPU usage on large servers.
  • Utility Thread Safety:
    • ConfirmationManager: Migrated to ConcurrentHashMap for fail-safe async cleanup.
    • AdminRecipientManager: Implemented CopyOnWriteArrayList to prevent broadcast crashes.
  • Logic Hardening:
    • StringUtil: Fixed Levenshtein matching to prevent false-positive "best matches" when input confidence is low.
    • UpdateChecker: Hardened version parsing to support complex version strings (e.g. -pre, -alpha) without numeric parsing errors.
  • Data Integrity: Added UUID parsing guards in AdminRecipientManager to handle manual configuration errors gracefully.

----------------------------------------------------​

Pet System Hardening (Final Stability Pass)
  • Performance Overhaul: Refactored PetListener chat processing to only scan relevant pets, eliminating O(N) server-wide scans and preventing chat-induced TPS drops. Implemented Regex Pattern caching on the Pet object itself to prevent thousands of expensive regex recompilations during chat events.
  • RAM Optimization (Lazy Loading): Rewrote PetDataStorage and Pet inventory handling. The server no longer creates empty Bukkit Inventory objects in memory for every loaded pet — inventories are now fully lazy-loaded on demand, saving significant heap memory on servers with large numbers of pets.
  • Thread-Safe Concurrency: Converted all internal mapping structures inside PetManager to ConcurrentHashMap (replacing unsafe HashMap instances) and implemented ThreadLocal date formatting in PetDataStorage. This entirely eliminates the risk of ConcurrentModificationException during async pet chat processing.
  • Feature Completion: Fully implemented missing subcommands in /ai pet (share, link-redeem, unlink), bridging the gap between command usage and backend logic.
  • Logging Precision: Upgraded pet chat logs to millisecond precision to prevent message overwrites during rapid-fire AI conversations.

----------------------------------------------------​

Manager Architecture Hardening (Final Platform Audit)
  • Universal Thread-Safety: All internal managers (Knowledge, Privacy, Settings, Shop, Addon, Data, ActiveConversation, SaveChat) have been fully migrated to ConcurrentHashMap and thread-safe data structures. This eliminates the risk of ConcurrentModificationException during high-frequency AI interactions.
  • Atomic File Persistence: Implemented synchronized file locks for all YML and Binary storage managers. This prevents data corruption during simultaneous async AI responses and ensures player settings, API usage counts, and chat histories are always saved correctly.
  • High-Performance Caching:
    • PermissionManager: Now features a memory-based permission cache, eliminating redundant disk I/O on every permission check — removing a primary source of server stutters.
    • PlayerDataManager: Implemented a memory cache for player stats, ensuring the AI can access player context instantly without disk reads.
  • Addon Management System Hardening:
    • Memory-Direct Loading: Refactored AddonManager to eliminate expensive temporary file creation/deletion when scanning addon JARs. Metadata is now read directly from the JAR stream via InputStreamReader, removing a major source of disk I/O lag and preventing file-lock errors.
    • API Modernization: Marked the legacy Addon interface as [USER=50248]@Deprecated[/USER] to streamline the v1.5 transition while maintaining full v1.4 backward compatibility.
    • Memory Leak Prevention: Implemented try-with-resources for all Addon JAR loading, ensuring URLClassLoader and JarFile handles are closed properly.
  • Config & Resource Integrity:
    • Resource Leak Fix: Hardened ConfigUpdater with try-with-resources for default configuration streams, preventing stranded file descriptors during repeated plugin reloads.
    • UTF-8 Enforcement: Standardized on StandardCharsets.UTF_8 for all configuration and addon metadata reading, ensuring consistency across different server locales.
    • Non-Destructive Updates: Hardened ConfigUpdater to be additive-only, safely preserving custom user keys and data across version upgrades.

----------------------------------------------------​

Extreme Optimization & RAM Efficiency (The Performance Overhaul)
  • Massive Codebase Consolidation:
    • Refactored fragmented AI calling logic into a unified core pipeline.
    • Deleted nearly 500 lines of redundant code across 12+ legacy provider methods (Summarization, Grammar, Headings, Extraction).
    • Legacy Data Package Archiving: Safely commented out the entire com.nsr.ai.plugin.data package (14 legacy DAO classes). This unused skeleton code is now archived, preventing accidental compilation, reducing the final JAR size, and shrinking the overall codebase footprint.
    • The plugin is now significantly smaller, faster to load, and easier to maintain.
  • Critical RAM Reduction:
    • Inventory Stripping: Removed ItemStack inventory caching from the PlayerData object. Data is now fetched directly from the online player only when needed, reducing heap memory usage by up to 90% on high-player-count servers.
    • Conversation TTL (Time To Live): Implemented an automated background task that purges inactive conversation histories from memory after 30 minutes of inactivity.
  • CPU & Lag Prevention:
    • Direct Search Algorithm: Optimized KnowledgeManager search logic to perform direct iteration, eliminating expensive HashMap copying on every query.
    • Resource Singletons: Standardized Gson and OkHttpClient as shared, high-performance singletons across all managers.
    • Event Handler Cleanup: Removed empty event listeners (e.g. onPlayerMove) to ensure the plugin has zero idle CPU overhead for non-AI tasks.
  • Persistence Hardening: Optimized PlayerDataManager and ConversationManager to ensure all data is persisted with atomic safety during async operations.
  • Cryptographic & Utility Speedups:
    • Encryption Cache: Implemented a ConcurrentHashMap cache for PBKDF2 key derivation in EncryptionUtil and SecurityUtil, eliminating massive CPU spikes during data decryption and player-specific key generation.
    • ThreadLocal Caching: Refactored ChatLogger to use ThreadLocal<SimpleDateFormat>, preventing thousands of unneeded object allocations per minute during heavy logging.
    • StringBuilder Refactor: Replaced inefficient string concatenation in MessageFormatter with StringBuilder, significantly reducing memory fragmentation and garbage collection pauses.
    • Randomness & String Optimization: Consolidated SecureRandom and ThreadLocalRandom usage for faster generation. Lifted invariant string transformations out of loops in StringUtil and pre-compiled Regex patterns in UpdateChecker for tighter execution.
  • Targeted Manager Optimizations:
    • ActiveConversation CPU/Memory: Completely removed the animationFrame tracking map from ActiveConversationManager. By utilizing localized closure state within the BukkitRunnable, thousands of auto-boxing memory allocations and map mutation operations that previously occurred every second during active AI conversations are now eliminated.
    • BugFixManager Memory: Removed private OkHttpClient and Gson instantiations, routing requests through the plugin's global singletons to eliminate duplicate thread pools.
    • ShopManager CPU: Extracted and pre-compiled the shop query Regex Pattern (SHOP_QUERY_PATTERN), stripping a heavy Pattern.compile() call out of the high-frequency chat event path.
    • AddonInfo Safety: Marked all fields as final, guaranteeing immutability and enabling JVM memory access optimizations for addon metadata DTOs.

----------------------------------------------------​

️ Developer API

NSR-AI 3.0-pre replaces the old, complex registration system with a modern, builder-pattern API that makes integration effortless. All critical paths are async-first, giving developers full control without blocking the game thread.

1. Simple Addon & Plugin Registration
Register your extension with a single line of code. NSR-AI handles all the complex reflection and internal logic automatically.

Code (Text):

// Register a native NSR-AI addon
NSRAI.getAPI().registerAddon(myAddon);

// Register an existing Bukkit plugin that wants AI features
NSRAI.getAPI().registerPlugin(myPlugin, myAddon);
 
  • registerAddon(AIAddon) — For native NSR-AI extensions.
  • registerPlugin(Plugin, AIAddon) — For existing Bukkit plugins that want to add AI features.

----------------------------------------------------​

2. Flexible AI Parameters (Temperature, Top-P, Top-K)
You no longer have to settle for the default AI "brain." Developers can programmatically adjust how the AI thinks for each specific request:

  • Temperature — Control creativity vs. factual precision.
  • Top-P & Top-K — Fine-tune the probability distribution of the AI's word selection.
  • Max Tokens — Set strict limits on response length to control costs.
  • Custom Settings — Inject ANY provider-specific parameter (e.g. OpenAI's presence_penalty) directly into the JSON request body.

----------------------------------------------------​

3. Async CompletableFuture API
All API calls are fully non-blocking. Use standard Java CompletableFuture chains to handle responses cleanly.

Code (Text):

api.askAI(player, "What is the weather today?")
   .thenAccept(response -> player.sendMessage(response))
   .exceptionally(err -> { err.printStackTrace(); return null; });
 
----------------------------------------------------​

4. Knowledge Base (RAG) Access
Code (Text):

// Read from the knowledge base
String info = api.getKnowledge("server-rules");

// Write to the knowledge base
api.setKnowledge("server-rules", "No griefing allowed.");
 
Requires the read-knowledge / edit-knowledge permissions to be granted to your addon in its permissions.yml.

----------------------------------------------------​

5. Session & Memory Management

Code (Text):

// Summarize a player's conversation history
api.summarizeChat(player);

// Clear a player's conversation session
api.clearSession(player);

// Access shared memory between addons
api.getSharedMemory().put("my-key", "my-value");
 
----------------------------------------------------​

6. Interceptor Registration

Code (Text):

api.registerInterceptor(new AIInterceptor() {
    @Override
    public String onPlayerInput(Player player, String input) {
        return input.replace("badword", "***"); // Edit input before it hits the AI
    }

    @Override
    public String onAIResponse(Player player, String response) {
        return "[MyAddon] " + response; // Add branding to responses
    }
});
 
----------------------------------------------------​

7. Dynamic Model & Provider Override

Code (Text):

// Override the model for a single request
AIRequest request = new AIRequest(player, "Summarize this:")
    .withModel("gemini-1.5-pro")
    .withProvider(AIProvider.GEMINI);

api.askAI(request).thenAccept(player::sendMessage);
 
----------------------------------------------------​

Developer-First. Admin-Controlled. Hardened Security. Effortless Integration.
NSR-AI 1.4 — The Platform for Intelligence.
----------, May 2, 2026

⚡ NSR-AI 1.3: The Hybrid Intelligence Engine ⚡
“The AI Layer for Minecraft Servers.”

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Welcome to the next evolution of server-side intelligence. NSR-AI v1.3 is a high-performance middleware architecture designed to bridge the gap between advanced Large Language Models (LLMs) and the Minecraft environment. This update is a fundamental shift toward precision control, latency masking, and adaptive memory engineering.

️ The Interactive Control Pipeline
We have re-engineered the communication layer to give you granular control over the AI's generation stream.

1. Granular Generation Controls
  • [Stop] — Interrupt Display Stream:
    Immediately "mutes" the AI's current message. Perfect for when you need to pivot your query or handle a sudden in-game threat.
    Technical Detail: Clicking [Stop] interrupts the display stream only. Tokens for the initiated request are still consumed by the API provider.
  • ✍️ [Edit] — Prompt Refinement:
    Mistyped a command? The [Edit] button acts as a "Time Machine." It instantly pulls your last message back into your chat bar so you can fix typos or tweak your instructions without retyping the whole paragraph.
  • [Regenerate] — Multi-Mode Divergence:
    If the AI didn't quite get it right, don't retype. Just hit [Regenerate] and choose a new "Brain Mode": Detailed, Simple, Default, Creative, or Concise.

2. Fact-Checking & Knowledge (RAG)
Say goodbye to AI "hallucinations" (when AI makes things up).
  • The "Cheat Sheet" System: Using Retrieval Augmented Generation (RAG), the AI reads your knowledge.yml file before it speaks. It extracts facts about your server lore, rules, or shop prices and uses them as a "cheat sheet" to give 100% accurate answers.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

️ Advanced Conversation Chronicles: /ai chat
Your interactions are more than just text—they are serialized data structures that define your server's lore.

  • Persistent State Management: Use /ai chat save <name> to immortalize complex role-play narratives. This saves the AI's current memory state, not just the text.
  • The Checkpoint System: Like a save-game in an RPG, the Checkpoint System (/ai chat resume) lets you jump back to a previous part of the conversation. Rewind to a specific checkpoint and try a different path.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Adaptive Context & Memory Distillation
We have moved beyond primitive history limits. The AI now manages its own "attention span" to stay sharp.

  • Context Meter (The HUD): You can see exactly how much the AI remembers via a percentage meter (e.g., Context: 24%).
  • Memory Distillation (Auto-Summary): As the chat gets too long, the AI doesn't just forget; it "writes a summary" of the past. It turns 50 messages of history into 1 concise "Diary Entry."
  • The Efficiency Edge (Tokens, Time & Cost):
    • Token & Cost Optimization: By distilling thousands of words into compact summaries, we drastically reduce the "payload" sent to the API, significantly cutting your API costs.
    • Ultra-Fast Processing: Smaller, distilled contexts are processed much faster, reducing "Thinking" time and delivering answers in record time.
    • Peak Accuracy: Distillation removes the "noise" of old, irrelevant chat data, ensuring every answer is sharp and hyper-relevant.
  • Multi-API Sovereignty: Switch between Gemini, Claude, and OpenAI in real-time. If one key hits a limit, the system can automatically cycle to a fallback key for zero downtime.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

The Unified Add-on Portal: /aia
NSR-AI 1.3 functions as a Micro-Kernel platform. The core handles the intelligence, while the extensions handle the gameplay mechanics.

  • Standardized Extension API: The /aia command portal is your "Control Center." Manage all modular add-ons like AFK Trackers, Player Stats, or Economy Bridges from one place.
  • Ecosystem Integrity: Check versions, verify authors, and manage technical health through a single, clean command structure.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Powering your world with intelligence that is Complex Inside, Simple Outside.
Unmatched Power. Zero-Lag Performance. Hardened Security. Effortless Control.
NSR-AI 1.3: Elevate Your Protocol. ⚡​
----------, Feb 1, 2026

NSR-AI v1.2.1 Patch Update
⚙️ Critical Hotfix for AI Response & Message Sender Module
A new maintenance release is rolling out: NSR-AI 1.2.1.
This patch delivers major stability improvements by fixing two core issues inside the nsr-ai-api layer:

Fixed Issues
1. AI Response Handler Bug
Some users on v1.2 experienced delayed or incomplete AI replies.
This has been fully resolved with optimized pipeline handling.

2. AI Message Sender Error
Outgoing AI messages were failing under certain player data states.
This patch stabilizes the message dispatch flow for all players.

Auto-Update Policy (Important)
Players currently on NSR-AI v1.2 will receive an automatic bug-fix update to v1.2.1.
This is a targeted patch.
Auto-update applies ONLY to v1.2 users.
Earlier versions remain unaffected, as the bug existed exclusively in the 1.2 build.

️ Stability Boost. Cleaner Logs. Smoother AI.
NSR-AI 1.2.1 ensures a more reliable in-game AI experience, sharper message delivery, and fewer interruptions.
Your server AI just leveled up.

Powering your world with smarter gameplay.
----------, Dec 2, 2025

NSR-AI v1.2: Enhanced Pet System, API Key Management & Open-Source Addon Platform

Welcome to a smarter, more resilient NSR-AI! This update introduces a highly advanced API Key Management system, designed for ultimate control, security, and flexibility, alongside the groundbreaking NSR-AI Open-Source Addon API and significant enhancements to the Pet System.

✨ Core Improvements

The entire API key, pet, API, and configuration systems have been thoroughly modified to enhance security, efficiency, and speed.
  • Unmatched Security: Stored keys are protected with military-grade AES-256-GCM encryption, salted with your unique player data.
  • Player Empowerment: You have full control over your own keys directly in-game, reducing reliance on server admins.
  • Enhanced Reliability: The intelligent rotation and fallback system ensures a much smoother and more reliable AI chat experience.
  • Simplified Error Messages: All API key errors now use a clear three-part format: Error [Code]: [Name]. Suggestion: [Fix]. Player-specific errors are shown only in-game, keeping the console clean.
  • Enhanced Help Command: The /ai help command now provides detailed descriptions for all commands and subcommands, making it easier for users to understand plugin functionalities.

New Features & Major Enhancements

Advanced API Key Manager

The entire key system has been rebuilt from the ground up, now consolidated under the powerful /ai apikey command.

Refined API Key Entry Workflow

When you type /ai apikey, you will now see these instructions:
  • To add a session-based key (temporary): Directly paste your API key in chat.
  • To store an existing session-based key (permanent): Type /ai apikey store <projectId>. This command will convert your most recently added session key into a permanent stored key, associating it with the provided <projectId>.
  • To store a new API key from scratch (permanent): First type /ai apikey, then type store-<your_api_key>. The system will automatically generate a unique Project ID for it.

Intelligent Key Rotation & Fallback

NSR-AI now automatically rotates through your available API keys for each request. This distributes the load and maximizes uptime.
  • Automatic Fallback: If a key is busy, rate-limited, or hits an error, the system automatically tries the next available key in your list, ensuring your conversation continues seamlessly.

Detailed Key Status & Statistics

Use /ai apikey info <key-id> to see a detailed breakdown of your key's performance.
  • Key Status Glossary:
    • Active (ACTIVE): The key is valid and ready, waiting in the wings.
    • Using (USING): This is the key currently processing your AI requests.
    • Overloaded (OVERLOADED): The key is temporarily rate-limited. The system will automatically skip it and try again later.
    • Limit Reached (LIMIT_REACHED): The key has hit a hard usage limit (e.g., daily/monthly quota) and will be skipped until the quota resets.
    • Inactive (INACTIVE): The key is invalid or has an error (e.g., wrong model, or other error ). It will not be used until it is changed to the active through timer reset.
  • Statistics Glossary:
    • Uses: The total number of successful AI responses this key has delivered.
    • Errors: How many times the key has failed (e.g., other API errors).
    • Fallbacks: The number of times the key had to switch from this key to another one because of an error and also includes the due to rate limits.

Manual Overload Timer Removal

A new command has been added to manually clear the overloaded status of an API key.
  • Command: /ai apikey timer <key-id> remove
  • Functionality: This command allows administrators to immediately remove the rate-limited or overloaded status from a specific API key (either player-specific or global). This is useful if an API provider issue has been resolved, and you wish to re-enable the key before its natural cooldown period expires.
  • Permissions: This command requires player permissions.

API Key Deletion

A new command allows for the removal of unwanted or corrupted API keys.
  • Command: /ai apikey clear <all|projectId>
  • Functionality: This command enables you to delete specific API keys by their projectId or clear all your API keys. This is particularly useful for removing corrupted, expired, or unused keys, helping to maintain a clean and efficient API key management system.
  • Permissions: Requires players permissions to manage API keys.

Automatic Provider Detection

When you add a key, NSR-AI instantly detects the provider (Google, Anthropic, OpenAI) and assigns a suitable default model, streamlining the setup process.

Per-Player Fallback System

  • [*You can now control whether the plugin uses server keys if your personal key fails.
  • Command: /ai apikey fallback global <true|false>
  • Default: false. The plugin will stop if your key fails.
  • Tab Completion: This new command has full tab-completion for ease of use.

Enhanced Chat and Logging

Chat History Saving Preference

Players now have granular control over whether their AI chat conversations are saved to the plugin's logs.
  • Command: /ai apikey msg save <true|false>
  • Functionality: This command allows a player to enable or disable the saving of their AI chat history for their active API key.
    • If set to true, chat messages (excluding API key entry messages) will be logged.
    • If set to false, chat messages will not be logged.
  • Default: false (chat history saving is disabled by default for enhanced privacy).

Enhanced Chat Logging and Session Management

The plugin now features a robust chat logging system designed for clarity, organization, and session tracking.
  • Dedicated Log Folders: Player and admin chat histories are stored in separate, dedicated folders (playerchathistory and adminchathistory) within the plugin's data directory.
  • Daily Log Rotation: A new log file is automatically created for each day, ensuring logs are easy to navigate and manage. Files are named chat-MM-dd-yyyy.log.
  • Intelligent Session Tracking:
    • If a player disconnects and reconnects within 5 minutes, their chat continues to be logged in the same daily log file.
    • If a player reconnects after more than 5 minutes, or on a new day, a new session-specific log file is created. These files are appended with a numerical suffix (e.g., chat-MM-dd-yyyy-1.log, chat-MM-dd-yyyy-2.log), providing clear separation of chat sessions.
  • In-Game Color Preservation: Chat logs accurately preserve the in-game color formatting, making them easier to read and review.
  • API Key Exclusion: All API keys (global and player-specific) and direct API key entry messages (store-<your_api_key>) are strictly excluded from all chat logs to ensure maximum security and prevent sensitive information leakage.
  • Pet Chat Logging (Optional): Chat interactions with pets can also be logged in a dedicated pet folder under the player's name (if enabled).

️ Security and Error Handling

Enhanced Security

While API keys are entered via chat, the plugin now employs advanced filtering to ensure that messages containing API keys (both global and player-specific) or those used for direct API key storage ( store-<your_api_key>) are never written to the plugin's chat history logs. This provides an additional layer of security, preventing sensitive information from being inadvertently recorded.

Error Message Philosophy
  • For Player Keys: Error messages for a player's personal key are inbuilt (hardcoded) and are only shown to the player in-game. The console remains clean. This is for security and privacy, as server owners do not have control over messages related to a player's personal API key.
  • For Global Keys: When a server-wide global key fails, a detailed, inbuilt error message is logged to the console for administrators. This log includes the API key type, error code, error name, and a suggestion for resolution.
  • In-game Message: If all available API keys (player-specific and global) fail to provide a response, a customizable globalKeyFailMessage (defined in features.yml) is displayed to the player in-game.

User Interface

Sleek Cyber-Console UI

All apikey commands feature a clean, professional "cyber-console" theme, making the interface intuitive and stylish.

Help Command Disclaimer

A small disclaimer has been added to the /ai help command, informing users that some commands might be misconfigured or have incorrect descriptions based on server settings.

Configuration Encryption & Security
  • Automatic Configuration Encryption: Sensitive data in config.yml, including the admin-activation-code and global API keys, are now automatically encrypted. The plugin intelligently encrypts new plain-text values on reload, so you can safely add or change keys in the config file.
  • New Admin Code Command: Server operators can now use the /ai admincode command to safely view the current admin activation code. This code is now generated automatically if it's not set in the config.

Bug Fixes and Stability Improvements

This update addresses several critical issues to enhance the plugin's reliability and security:
  • Configuration Reload System Fixed: Resolved an issue where configuration changes (for config.yml, features.yml, etc.) were not being applied correctly after a /ai reload command, despite the plugin reporting a successful reload. The reload system now accurately updates all relevant settings.
  • API Key Logging Prevention: Fixed a security vulnerability where API keys, when entered via chat, could inadvertently be saved in chat history logs. The plugin now strictly prevents any API key information from being written to logs, ensuring sensitive data remains secure.

File Organization
  • Data files have been reorganized into new folders for better management:
    • bug.txt is now at: plugins/NSR-AI/security/bug.txt
    • bugfix.reloading is now at: plugins/NSR-AI/security/bugfix.reloading
    • reserved-nicknames.yml is now at: plugins/NSR-AI/pets/reserved-nicknames.yml
    • death_log.yml is now at: plugins/NSR-AI/pets/death_log.yml
This update empowers you with a robust and transparent key management system. We can't wait for you to experience the new level of control and reliability!

️ Advanced Security Architecture

NSR-AI is built with a security-first mindset. The plugin employs a multi-layered strategy to protect sensitive data, particularly player API keys. This section details the core components of our security framework.

Core Security Files

These files are the foundation of the plugin's encryption system and are located in the plugins/NSR-AI/security/ directory.
  • master_secret.conf: This file contains a unique, randomly generated secret value. It acts as the primary seed for generating the server's main encryption key. Never share this file.
  • server.salt: This is a random value used to add complexity to the encryption process, making it more resistant to pre-computation attacks (like rainbow tables). It ensures that even if two servers had the same master secret, their final encryption keys would be different.
  • master.key: This is the final, derived Server Master Key. It is generated by combining the master_secret.conf and the server.salt. This is the key that performs the second layer of encryption on all stored API keys.

Player API Key Storage Security

When a player stores an API key using /ai apikey store or the store-<key> format, it is never saved in plain text. Instead, it undergoes a robust, three-layer encryption process.
  1. Storage Location: Stored keys are saved in the plugins/NSR-AI/player_keys/<player_uuid>/ directory. Each player has their own dedicated folder, named after their unique player ID (UUID). Within this folder, individual API keys are stored in separate .yml files, named after their Project ID (<project_id>.yml). This player-specific folder also contains the player's unique master.key and salt.bin files, which are crucial for deriving their Player Master Key.
  2. Layer 1: Key-Specific Encryption:
    • First, a unique encryption key (userKey) is derived from a combination of the player's UUID and the key's Project ID.
    • The raw API key is then encrypted with this userKey. This means every single stored key has its own unique first layer of protection.
  3. Layer 2: Player-Specific Master Key Encryption:
    • The already-encrypted data from Layer 1 is then encrypted again, this time using the Player Master Key. Each player has their own unique Player Master Key, derived from their master.key and salt.bin files, adding a crucial layer of individual security.
  4. Layer 3: Server-Wide Master Key Encryption:
    • The already-encrypted data from Layer 2 is then encrypted again, this time using the Server Master Key (master.key).
    • This triply-encrypted key is what is actually written to the player's .yml file.
  5. Integrity Verification (Hashing):
    • Alongside the encrypted key, the plugin stores a SHA-256 hash of the final encrypted data.
    • When the server starts and loads the key, it re-calculates the hash. If the new hash does not match the stored hash, the data has been tampered with and will not load the key, logging a security warning.
This multi-layered approach ensures that API keys are exceptionally secure. An attacker would need to compromise the server to get the master.key, server.salt, master_secret.conf, and know the specific player's UUID and Project ID to even begin to decrypt a single key.

Introducing the NSR-AI Open-Source Addon API

We are thrilled to announce the open-sourcing of the NSR-AI Addon API! This new API layer transforms NSR-AI into a powerful platform, allowing developers to create rich, integrated addons without directly modifying the core plugin. It provides a secure and stable bond, enabling addons to interact with key functionalities, much like a dedicated communication channel.

✨ Key Addon Capabilities:
  • Admin Mode Management: Addons can now programmatically toggle and monitor a player's NSR-AI admin mode, enabling advanced moderation or event-driven features.
  • Advanced GUI Customization: Developers can register and open their own custom Graphical User Interfaces, offering full control over layout and interaction within the NSR-AI ecosystem.
  • Player AI States: Access and manage player-specific AI interaction settings, including AI chat cooldown status, remaining time, and AI enablement, allowing for smarter, context-aware addon behavior.
  • Knowledge Base Interaction: Addons can directly add, remove, and retrieve entries from NSR-AI's core knowledge base, enabling dynamic expansion or curation of the AI's understanding.
  • Conversation History Control: Gain programmatic control over player conversation histories, including clearing, summarizing, refreshing, and retrieving past interactions for analysis or custom display.
  • Configuration Reloading: Addons can trigger reloads of NSR-AI's main configuration, feature settings, and the knowledge base, allowing for dynamic updates without a server restart.

️ Important Restrictions:

To maintain NSR-AI's security, stability, and integrity, certain functionalities remain exclusively within the core plugin and are not exposed via the Addon API:
  • No Security Bypass: The API offers no methods to circumvent or disable NSR-AI's robust security mechanisms, including addon banning.
  • No Bug Fixation Interference: Addons cannot interfere with or disable the core plugin's critical bug fixation logic.
  • No Direct API Key Management: Addons cannot add new API providers or modify API key limits. Furthermore, addons cannot steal player API keys nor do they have direct control over them. The core plugin maintains absolute control over API key management, ensuring secure and efficient operation.

Pet System Enhancements

This update brings significant new features and improvements to the pet system, making your companions more interactive and personalized.

New Pet Types Introduced
  • Expanded Pet Roster: The plugin now supports a wider variety of Minecraft entities as pets, including:
    • Wolf, Cat, Horse, Parrot, Pig, Panda, Sheep, Cow.
  • Technoblade Tribute Pig: The Pig pet now features a special death message: "(pet name) never dies! ".

Pet Features & Management
  • Pet Inventory: Pets now have their own inventories, accessible via /ai pet inv.
  • Pet Details: Use /ai pet to view details about your active pet.
  • Pet Stats: Pets now track level, xp, health, hunger, and mood.
  • Stat Regeneration: Pets periodically regenerate health and hunger, and their mood updates over time.
  • Hunger and Health Decay: Pets now experience natural hunger and health decay over time, requiring players to feed and care for them to maintain their well-being.
  • Mood System Refinement: Pet moods are now managed by an enum (HAPPY, NEUTRAL, SAD, HUNGRY, TIRED, ANGRY, FURIOUS) for more expressive behavior.

Shareable Pet Link System

A groundbreaking feature allowing players to share access to their pets with friends, fostering a more social and interactive pet experience.
  • Conditional Access: Generate links that either grant immediate access or require owner approval.
  • Custom Relationships: Define unique relationships (e.g., "brother", "sister", "ally") for friends, influencing future pet interactions.
  • Link Generation (/ai pet share):
    • /ai pet share <pet_name>: Generates a link requiring owner acceptance.
    • /ai pet share <pet_name> allow: Generates a link for immediate access.
    • /ai pet share <pet_name> <relationship>: Generates a link with a custom relationship, requiring owner acceptance.
    • /ai pet share <pet_name> <relationship> allow: Generates a link with a custom relationship, immediate access.
  • Link Usage (/ai pet <link_code>): Players use this to activate links, triggering access or acceptance requests.
  • Owner Acceptance: Clickable chat messages for owners to accept or deny friend requests.
  • Friend Management (/ai pet removefriend, /ai pet relation):
    • /ai pet removefriend <player_name> <pet_name>: Owner removes a friend's access.
    • /ai pet relation <pet_name> <player_name> <new_relationship>: Owner changes a friend's relationship.
  • Listing Commands:
    • /ai pet link list: Shows your own pets that are linked with other players.
    • /ai pet linked list: Shows other players' pets that are linked with you.
  • Player Unlinking (/ai pet unlink <pet_name>): Friends can voluntarily remove their own access to a pet.
  • Dynamic Relationships: The system supports any custom relationship string typed by the owner, with "friend" as the default.
  • Tab Completion: Comprehensive tab completion for all new commands.
  • Pet Inventory Access for Friends: Added /ai pet inv allow|disallow <pet_name> <player_name> command to allow or disallow specific players to access a pet's inventory.
  • Pet Barking: Pets will now "bark" or make a species-appropriate sound when a non-owner/non-friend talks to them.

Advanced Knowledge Search (Hybrid AI System)

The /ai data command has been completely re-engineered into a sophisticated, hybrid AI system that seamlessly blends conversational AI with a precise, local knowledge base search. This new approach provides more accurate, context-aware answers while significantly optimizing API usage.

This system operates on a multi-step principle known as Retrieval Augmented Generation (RAG):
  1. Intent Recognition & Retrieval: When you ask a question like /ai data hey who is the owner of this plugin?, the system doesn't just send your message to the AI. First, it intelligently analyzes your message to identify the core question ("who is the owner of this plugin?"). It then uses this core question to perform a highly targeted search within the knowledge.yml file, retrieving only the most relevant pieces of information.
  2. Augmented Generation: Next, the system constructs a new, highly-detailed prompt for the main AI. This prompt includes your original, full message along with the specific, relevant information retrieved from the knowledge base. This acts as a "cheat sheet" for the AI, giving it the exact facts it needs to answer your question correctly.
  3. Natural, Contextual Response: Finally, the AI processes this combined information and generates a single, natural-sounding response that incorporates both the conversational elements of your original message and the factual data from the knowledge base. The result is a fluid answer like, "Hello! The owner of the NSR-AI plugin is BlackForge."
This advanced process ensures that you get the most accurate and relevant answers, drawn directly from the server's custom knowledge, while preventing the high costs and potential inaccuracies of sending large, irrelevant amounts of data to the AI.
----------, Nov 16, 2025

NSR-AI v1.2: Enhanced Pet System, API Key Management & Open-Source Addon Platform

Welcome to a smarter, more resilient NSR-AI! This update introduces a highly advanced API Key Management system, designed for ultimate control, security, and flexibility, alongside the groundbreaking NSR-AI Open-Source Addon API and significant enhancements to the Pet System.

✨ Core Improvements

The entire API key, pet, API, and configuration systems have been thoroughly modified to enhance security, efficiency, and speed.
  • Unmatched Security: Stored keys are protected with military-grade AES-256-GCM encryption, salted with your unique player data.
  • Player Empowerment: You have full control over your own keys directly in-game, reducing reliance on server admins.
  • Enhanced Reliability: The intelligent rotation and fallback system ensures a much smoother and more reliable AI chat experience.
  • Simplified Error Messages: All API key errors now use a clear three-part format: Error [Code]: [Name]. Suggestion: [Fix]. Player-specific errors are shown only in-game, keeping the console clean.
  • Enhanced Help Command: The /ai help command now provides detailed descriptions for all commands and subcommands, making it easier for users to understand plugin functionalities.

New Features & Major Enhancements

Advanced API Key Manager

The entire key system has been rebuilt from the ground up, now consolidated under the powerful /ai apikey command.

Refined API Key Entry Workflow

When you type /ai apikey, you will now see these instructions:
  • To add a session-based key (temporary): Directly paste your API key in chat.
  • To store an existing session-based key (permanent): Type /ai apikey store <projectId>. This command will convert your most recently added session key into a permanent stored key, associating it with the provided <projectId>.
  • To store a new API key from scratch (permanent): First type /ai apikey, then type store-<your_api_key>. The system will automatically generate a unique Project ID for it.

Intelligent Key Rotation & Fallback

NSR-AI now automatically rotates through your available API keys for each request. This distributes the load and maximizes uptime.
  • Automatic Fallback: If a key is busy, rate-limited, or hits an error, the system automatically tries the next available key in your list, ensuring your conversation continues seamlessly.

Detailed Key Status & Statistics

Use /ai apikey info <key-id> to see a detailed breakdown of your key's performance.
  • Key Status Glossary:
    • Active (ACTIVE): The key is valid and ready, waiting in the wings.
    • Using (USING): This is the key currently processing your AI requests.
    • Overloaded (OVERLOADED): The key is temporarily rate-limited. The system will automatically skip it and try again later.
    • Limit Reached (LIMIT_REACHED): The key has hit a hard usage limit (e.g., daily/monthly quota) and will be skipped until the quota resets.
    • Inactive (INACTIVE): The key is invalid or has an error (e.g., wrong model, or other error ). It will not be used until it is changed to the active through timer reset.
  • Statistics Glossary:
    • Uses: The total number of successful AI responses this key has delivered.
    • Errors: How many times the key has failed (e.g., other API errors).
    • Fallbacks: The number of times the key had to switch from this key to another one because of an error and also includes the due to rate limits.

Manual Overload Timer Removal

A new command has been added to manually clear the overloaded status of an API key.
  • Command: /ai apikey timer <key-id> remove
  • Functionality: This command allows administrators to immediately remove the rate-limited or overloaded status from a specific API key (either player-specific or global). This is useful if an API provider issue has been resolved, and you wish to re-enable the key before its natural cooldown period expires.
  • Permissions: This command requires player permissions.

API Key Deletion

A new command allows for the removal of unwanted or corrupted API keys.
  • Command: /ai apikey clear <all|projectId>
  • Functionality: This command enables you to delete specific API keys by their projectId or clear all your API keys. This is particularly useful for removing corrupted, expired, or unused keys, helping to maintain a clean and efficient API key management system.
  • Permissions: Requires players permissions to manage API keys.

Automatic Provider Detection

When you add a key, NSR-AI instantly detects the provider (Google, Anthropic, OpenAI) and assigns a suitable default model, streamlining the setup process.

Per-Player Fallback System

  • [*You can now control whether the plugin uses server keys if your personal key fails.
  • Command: /ai apikey fallback global <true|false>
  • Default: false. The plugin will stop if your key fails.
  • Tab Completion: This new command has full tab-completion for ease of use.

Enhanced Chat and Logging

Chat History Saving Preference

Players now have granular control over whether their AI chat conversations are saved to the plugin's logs.
  • Command: /ai apikey msg save <true|false>
  • Functionality: This command allows a player to enable or disable the saving of their AI chat history for their active API key.
    • If set to true, chat messages (excluding API key entry messages) will be logged.
    • If set to false, chat messages will not be logged.
  • Default: false (chat history saving is disabled by default for enhanced privacy).

Enhanced Chat Logging and Session Management

The plugin now features a robust chat logging system designed for clarity, organization, and session tracking.
  • Dedicated Log Folders: Player and admin chat histories are stored in separate, dedicated folders (playerchathistory and adminchathistory) within the plugin's data directory.
  • Daily Log Rotation: A new log file is automatically created for each day, ensuring logs are easy to navigate and manage. Files are named chat-MM-dd-yyyy.log.
  • Intelligent Session Tracking:
    • If a player disconnects and reconnects within 5 minutes, their chat continues to be logged in the same daily log file.
    • If a player reconnects after more than 5 minutes, or on a new day, a new session-specific log file is created. These files are appended with a numerical suffix (e.g., chat-MM-dd-yyyy-1.log, chat-MM-dd-yyyy-2.log), providing clear separation of chat sessions.
  • In-Game Color Preservation: Chat logs accurately preserve the in-game color formatting, making them easier to read and review.
  • API Key Exclusion: All API keys (global and player-specific) and direct API key entry messages (store-<your_api_key>) are strictly excluded from all chat logs to ensure maximum security and prevent sensitive information leakage.
  • Pet Chat Logging (Optional): Chat interactions with pets can also be logged in a dedicated pet folder under the player's name (if enabled).

️ Security and Error Handling

Enhanced Security

While API keys are entered via chat, the plugin now employs advanced filtering to ensure that messages containing API keys (both global and player-specific) or those used for direct API key storage ( store-<your_api_key>) are never written to the plugin's chat history logs. This provides an additional layer of security, preventing sensitive information from being inadvertently recorded.

Error Message Philosophy
  • For Player Keys: Error messages for a player's personal key are inbuilt (hardcoded) and are only shown to the player in-game. The console remains clean. This is for security and privacy, as server owners do not have control over messages related to a player's personal API key.
  • For Global Keys: When a server-wide global key fails, a detailed, inbuilt error message is logged to the console for administrators. This log includes the API key type, error code, error name, and a suggestion for resolution.
  • In-game Message: If all available API keys (player-specific and global) fail to provide a response, a customizable globalKeyFailMessage (defined in features.yml) is displayed to the player in-game.

User Interface

Sleek Cyber-Console UI

All apikey commands feature a clean, professional "cyber-console" theme, making the interface intuitive and stylish.

Help Command Disclaimer

A small disclaimer has been added to the /ai help command, informing users that some commands might be misconfigured or have incorrect descriptions based on server settings.

Configuration Encryption & Security
  • Automatic Configuration Encryption: Sensitive data in config.yml, including the admin-activation-code and global API keys, are now automatically encrypted. The plugin intelligently encrypts new plain-text values on reload, so you can safely add or change keys in the config file.
  • New Admin Code Command: Server operators can now use the /ai admincode command to safely view the current admin activation code. This code is now generated automatically if it's not set in the config.

Bug Fixes and Stability Improvements

This update addresses several critical issues to enhance the plugin's reliability and security:
  • Configuration Reload System Fixed: Resolved an issue where configuration changes (for config.yml, features.yml, etc.) were not being applied correctly after a /ai reload command, despite the plugin reporting a successful reload. The reload system now accurately updates all relevant settings.
  • API Key Logging Prevention: Fixed a security vulnerability where API keys, when entered via chat, could inadvertently be saved in chat history logs. The plugin now strictly prevents any API key information from being written to logs, ensuring sensitive data remains secure.

File Organization
  • Data files have been reorganized into new folders for better management:
    • bug.txt is now at: plugins/NSR-AI/security/bug.txt
    • bugfix.reloading is now at: plugins/NSR-AI/security/bugfix.reloading
    • reserved-nicknames.yml is now at: plugins/NSR-AI/pets/reserved-nicknames.yml
    • death_log.yml is now at: plugins/NSR-AI/pets/death_log.yml
This update empowers you with a robust and transparent key management system. We can't wait for you to experience the new level of control and reliability!

️ Advanced Security Architecture

NSR-AI is built with a security-first mindset. The plugin employs a multi-layered strategy to protect sensitive data, particularly player API keys. This section details the core components of our security framework.

Core Security Files

These files are the foundation of the plugin's encryption system and are located in the plugins/NSR-AI/security/ directory.
  • master_secret.conf: This file contains a unique, randomly generated secret value. It acts as the primary seed for generating the server's main encryption key. Never share this file.
  • server.salt: This is a random value used to add complexity to the encryption process, making it more resistant to pre-computation attacks (like rainbow tables). It ensures that even if two servers had the same master secret, their final encryption keys would be different.
  • master.key: This is the final, derived Server Master Key. It is generated by combining the master_secret.conf and the server.salt. This is the key that performs the second layer of encryption on all stored API keys.

Player API Key Storage Security

When a player stores an API key using /ai apikey store or the store-<key> format, it is never saved in plain text. Instead, it undergoes a robust, three-layer encryption process.
  1. Storage Location: Stored keys are saved in the plugins/NSR-AI/player_keys/<player_uuid>/ directory. Each player has their own dedicated folder, named after their unique player ID (UUID). Within this folder, individual API keys are stored in separate .yml files, named after their Project ID (<project_id>.yml). This player-specific folder also contains the player's unique master.key and salt.bin files, which are crucial for deriving their Player Master Key.
  2. Layer 1: Key-Specific Encryption:
    • First, a unique encryption key (userKey) is derived from a combination of the player's UUID and the key's Project ID.
    • The raw API key is then encrypted with this userKey. This means every single stored key has its own unique first layer of protection.
  3. Layer 2: Player-Specific Master Key Encryption:
    • The already-encrypted data from Layer 1 is then encrypted again, this time using the Player Master Key. Each player has their own unique Player Master Key, derived from their master.key and salt.bin files, adding a crucial layer of individual security.
  4. Layer 3: Server-Wide Master Key Encryption:
    • The already-encrypted data from Layer 2 is then encrypted again, this time using the Server Master Key (master.key).
    • This triply-encrypted key is what is actually written to the player's .yml file.
  5. Integrity Verification (Hashing):
    • Alongside the encrypted key, the plugin stores a SHA-256 hash of the final encrypted data.
    • When the server starts and loads the key, it re-calculates the hash. If the new hash does not match the stored hash, the data has been tampered with and will not load the key, logging a security warning.
This multi-layered approach ensures that API keys are exceptionally secure. An attacker would need to compromise the server to get the master.key, server.salt, master_secret.conf, and know the specific player's UUID and Project ID to even begin to decrypt a single key.

Introducing the NSR-AI Open-Source Addon API

We are thrilled to announce the open-sourcing of the NSR-AI Addon API! This new API layer transforms NSR-AI into a powerful platform, allowing developers to create rich, integrated addons without directly modifying the core plugin. It provides a secure and stable bond, enabling addons to interact with key functionalities, much like a dedicated communication channel.

✨ Key Addon Capabilities:
  • Admin Mode Management: Addons can now programmatically toggle and monitor a player's NSR-AI admin mode, enabling advanced moderation or event-driven features.
  • Advanced GUI Customization: Developers can register and open their own custom Graphical User Interfaces, offering full control over layout and interaction within the NSR-AI ecosystem.
  • Player AI States: Access and manage player-specific AI interaction settings, including AI chat cooldown status, remaining time, and AI enablement, allowing for smarter, context-aware addon behavior.
  • Knowledge Base Interaction: Addons can directly add, remove, and retrieve entries from NSR-AI's core knowledge base, enabling dynamic expansion or curation of the AI's understanding.
  • Conversation History Control: Gain programmatic control over player conversation histories, including clearing, summarizing, refreshing, and retrieving past interactions for analysis or custom display.
  • Configuration Reloading: Addons can trigger reloads of NSR-AI's main configuration, feature settings, and the knowledge base, allowing for dynamic updates without a server restart.

️ Important Restrictions:

To maintain NSR-AI's security, stability, and integrity, certain functionalities remain exclusively within the core plugin and are not exposed via the Addon API:
  • No Security Bypass: The API offers no methods to circumvent or disable NSR-AI's robust security mechanisms, including addon banning.
  • No Bug Fixation Interference: Addons cannot interfere with or disable the core plugin's critical bug fixation logic.
  • No Direct API Key Management: Addons cannot add new API providers or modify API key limits. Furthermore, addons cannot steal player API keys nor do they have direct control over them. The core plugin maintains absolute control over API key management, ensuring secure and efficient operation.

Pet System Enhancements

This update brings significant new features and improvements to the pet system, making your companions more interactive and personalized.

New Pet Types Introduced
  • Expanded Pet Roster: The plugin now supports a wider variety of Minecraft entities as pets, including:
    • Wolf, Cat, Horse, Parrot, Pig, Panda, Sheep, Cow.
  • Technoblade Tribute Pig: The Pig pet now features a special death message: "(pet name) never dies! ".

Pet Features & Management
  • Pet Inventory: Pets now have their own inventories, accessible via /ai pet inv.
  • Pet Details: Use /ai pet to view details about your active pet.
  • Pet Stats: Pets now track level, xp, health, hunger, and mood.
  • Stat Regeneration: Pets periodically regenerate health and hunger, and their mood updates over time.
  • Hunger and Health Decay: Pets now experience natural hunger and health decay over time, requiring players to feed and care for them to maintain their well-being.
  • Mood System Refinement: Pet moods are now managed by an enum (HAPPY, NEUTRAL, SAD, HUNGRY, TIRED, ANGRY, FURIOUS) for more expressive behavior.

Shareable Pet Link System

A groundbreaking feature allowing players to share access to their pets with friends, fostering a more social and interactive pet experience.
  • Conditional Access: Generate links that either grant immediate access or require owner approval.
  • Custom Relationships: Define unique relationships (e.g., "brother", "sister", "ally") for friends, influencing future pet interactions.
  • Link Generation (/ai pet share):
    • /ai pet share <pet_name>: Generates a link requiring owner acceptance.
    • /ai pet share <pet_name> allow: Generates a link for immediate access.
    • /ai pet share <pet_name> <relationship>: Generates a link with a custom relationship, requiring owner acceptance.
    • /ai pet share <pet_name> <relationship> allow: Generates a link with a custom relationship, immediate access.
  • Link Usage (/ai pet <link_code>): Players use this to activate links, triggering access or acceptance requests.
  • Owner Acceptance: Clickable chat messages for owners to accept or deny friend requests.
  • Friend Management (/ai pet removefriend, /ai pet relation):
    • /ai pet removefriend <player_name> <pet_name>: Owner removes a friend's access.
    • /ai pet relation <pet_name> <player_name> <new_relationship>: Owner changes a friend's relationship.
  • Listing Commands:
    • /ai pet link list: Shows your own pets that are linked with other players.
    • /ai pet linked list: Shows other players' pets that are linked with you.
  • Player Unlinking (/ai pet unlink <pet_name>): Friends can voluntarily remove their own access to a pet.
  • Dynamic Relationships: The system supports any custom relationship string typed by the owner, with "friend" as the default.
  • Tab Completion: Comprehensive tab completion for all new commands.
  • Pet Inventory Access for Friends: Added /ai pet inv allow|disallow <pet_name> <player_name> command to allow or disallow specific players to access a pet's inventory.
  • Pet Barking: Pets will now "bark" or make a species-appropriate sound when a non-owner/non-friend talks to them.

Advanced Knowledge Search (Hybrid AI System)

The /ai data command has been completely re-engineered into a sophisticated, hybrid AI system that seamlessly blends conversational AI with a precise, local knowledge base search. This new approach provides more accurate, context-aware answers while significantly optimizing API usage.

This system operates on a multi-step principle known as Retrieval Augmented Generation (RAG):
  1. Intent Recognition & Retrieval: When you ask a question like /ai data hey who is the owner of this plugin?, the system doesn't just send your message to the AI. First, it intelligently analyzes your message to identify the core question ("who is the owner of this plugin?"). It then uses this core question to perform a highly targeted search within the knowledge.yml file, retrieving only the most relevant pieces of information.
  2. Augmented Generation: Next, the system constructs a new, highly-detailed prompt for the main AI. This prompt includes your original, full message along with the specific, relevant information retrieved from the knowledge base. This acts as a "cheat sheet" for the AI, giving it the exact facts it needs to answer your question correctly.
  3. Natural, Contextual Response: Finally, the AI processes this combined information and generates a single, natural-sounding response that incorporates both the conversational elements of your original message and the factual data from the knowledge base. The result is a fluid answer like, "Hello! The owner of the NSR-AI plugin is BlackForge."
This advanced process ensures that you get the most accurate and relevant answers, drawn directly from the server's custom knowledge, while preventing the high costs and potential inaccuracies of sending large, irrelevant amounts of data to the AI.
----------, Nov 16, 2025

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 tame command 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 apikey command.
  • 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
  1. Tame a Pet: Tame a wolf, cat, or any other supported animal in Minecraft.
  2. Give it a Name: Use a nametag to give your new companion a name.
  3. Link to the AI: Look at your pet and type /ai pet tame.
  4. Give it a Nickname: Use /ai pet nickname <nickname> to give your pet a unique nickname.
  5. 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.(note that current plugin bug version will may have bugs and all

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.txt file 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.
----------, Oct 15, 2025

NSR-AI v1.2-Beta - 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 tame command 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 apikey <key> command.
  • 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 in the normal chat paste <key> not in the command): 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
  1. Tame a Pet: Tame a wolf, cat, or any other supported animal in Minecraft.
  2. Give it a Name: Use a nametag to give your new companion a name.
  3. Link to the AI: Look at your pet and type /ai pet tame.
  4. Give it a Nickname: Use /ai pet nickname <nickname> to give your pet a unique nickname.
  5. 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.txt file 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.
----------, Oct 5, 2025

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)

/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)

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)

/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)

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/

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Permissions

- Player Commands: Any player can use /ai cache clear/refresh and /ai memory clear/refresh for themselves.
- Admin Commands: Commands targeting other players or all require 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.
- New In-Game Version Command: /ai version (or /ai v) lets players:
- 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: Server console displays a notification if outdated; admins get in-game messages with download links.
- Cloudflare Worker Integration: Ensures efficient and reliable version verification.
- Enhanced Plugin Startup Message: Displays plugin name, version, and developer info in a clear format.

Recent Feature Enhancements

- Enhanced Command Set:
- /ai admin <activation_code>: Toggle administrator mode.
- /ai data <query>: Queries local knowledge base.
- /ai add <keyword> <heading> <response>: Add new entries in-game.
- /ai remove <keyword>: Remove entries in-game.
- /ai reload: Reloads plugin configuration.
- API Load Reduction: Prioritize local knowledge base responses for /ai data commands.
- Improved Plugin Lifecycle Messages: More informative onDisable() messages.
- Enhanced /ai add command: AI-generated headings, preview before confirmation.
- Robust /ai data command: Falls back to local knowledge base if AI API fails.
- Configurable Knowledge Base Output Color: chat-colors.knowledge-base in features.yml.

New Features (from latest update)

- Symmetric add/remove commands: Shows removed content when /ai remove <keyword> is used.
- Improved Knowledge Base Search: /ai data <query> searches headings and answers, provides direct matches or prompts.
- Direct Search Results Display: Displays answer if a clear match is found.
- Cleaned-up Heading Display: "Heading (AI-generated):" removed in preview.
- New /ai data all Command: View all knowledge base entries.
- Configurable Knowledge Confirmation: simple-knowledge-yml-approve setting for confirmation process.

Granular Command Toggles

Controls over individual AI commands via features.yml:
- command-toggles.data: /ai data and /ai data all (Default: true)
- command-toggles.admin: /ai admin (Default: true)
- command-toggles.disable: /ai disable (Default: true)
- command-toggles.version: /ai version /ai v (Default: true)
- command-toggles.add: /ai add (Default: true)
- command-toggles.add-confirm: Confirmation step for /ai add (Default: true)
- command-toggles.remove: /ai remove (Default: true)
- command-toggles.remove-confirm: Confirmation step for /ai remove (Default: true)
- command-toggles.memory-clear: /ai memory clear (Default: true)
- command-toggles.memory-refresh: /ai memory refresh (Default: true)
- command-toggles.cache-clear: /ai cache clear (Default: true)
- command-toggles.cache-refresh: /ai cache refresh (Default: true)

Enhanced /ai reload Command

- /ai reload: Reloads main config.yml
- /ai reload c / /ai reload config: Reloads only config.yml
- /ai reload f / /ai reload features: Reloads only features.yml
- /ai reload k / /ai reload knowledge: Reloads only knowledge base
- /ai reload nsr-ai: Reloads entire plugin (configs + knowledge base)

New /ai help Command

- /ai help: Displays concise help message with descriptions for enabled commands.
- Typing /ai without arguments displays the help message.
- Tab Completion: Intelligent suggestions for sub-commands and arguments.

Addon Enhancements

- Backward Compatibility: Supports both NSR-AI v1.1 and lower via reflection.
- Enhanced Privacy Command (/ai privacy):
- Non-Admins: Manage own privacy settings.
- Admins: Manage others’ privacy or own settings.
- Improved Tab Completion: For privacy features and on/off options.
- Player Data Initialization: Ensures proper data creation for new players.
- Detailed AFK Time Display: /ai stats now shows AFK duration.
- Version Update: Addon version updated to 1.0.2.

Advanced Knowledge Base Search

- Relevance-Based Scoring: Prioritizes relevant entries.
- Content and Heading Search: Matches in headings and content.
- Weighted Headings: Higher weight for heading matches.
- Fuzzy Search: Tolerant of irregular syntax.
- Top 5 Results: Returns the 5 most relevant results.
----------, Sep 14, 2025

# NSR-AI Plugin - Features (Version 1.1-pre2)

This document provides a detailed description of the features available in the NSR-AI Plugin.

Core Features

- AI-Powered Chat: Engage in intelligent conversations with an AI directly in your Minecraft server.
- Knowledge Base: A powerful system to store and retrieve server-specific information, such as rules, event details, and FAQs.
- Admin Mode: A dedicated mode for server administrators with access to advanced commands and features.

Command Structure

- /ai &lt;message&gt;: For general AI conversations.
- /ai data &lt;question&gt;: To query the knowledge base for specific information.
- /ai admin &lt;your_activation_code&gt;: To activate admin mode.
- /ai disable: To deactivate admin mode.

Knowledge Base Management (Admin-Only)

- /ai add &lt;content&gt;: Add new information to the knowledge base. The AI will automatically correct grammar and spelling.
- /ai remove &lt;question&gt;: Remove entries from the knowledge base.
- /ai confirm &lt;code&gt; [keyword]: Confirm the addition or removal of knowledge base entries.

Advanced Features

- AI-Generated Headings: When adding to the knowledge base, the AI generates descriptive headings for better organization.
- Enhanced Fuzzy Matching: The knowledge base search uses a smart matching algorithm to find relevant information even with varied phrasing.
- Confirmation System: A secure, 6-digit code confirmation system for all knowledge base modifications.
- Automatic Reload: The knowledge base is automatically reloaded after any changes, ensuring information is always up-to-date.
- Robust and Stable: Asynchronous API calls prevent server lag, and a retry mechanism for API calls improves reliability.
- Clean Chat History: Chat history is saved in a clean, easy-to-read format.

How to Use the Knowledge Base

1. Activate Admin Mode: /ai admin &lt;your_activation_code&gt;
2. Add Information:
- /ai add &lt;content&gt; (e.g., /ai add The server rules are available on our website at example.com/rules.)
- The AI will provide a corrected version of your text and a 6-digit confirmation code.
3. Confirm Addition:
- /ai confirm &lt;code&gt; &lt;keyword&gt; (e.g., /ai confirm 123456 rules)
- The information is now permanently stored in the knowledge base.
4. Query the Knowledge Base:
- /ai data &lt;question&gt; (e.g., /ai data what are the server rules?)
- The AI will retrieve and display the relevant information.
----------, Sep 3, 2025

Version 1.1-pre1
New feature personalized greetings and responses using your
player name.
example: if you asked what is my name or anything else
it may response with your name depend on question you asked
----------, Aug 29, 2025

New Features in NSR-AI 1.0.2

This document provides a detailed overview of the new features that have been added in version 1.0.2 of the NSR-AI plugin and its Advanced Player Stats addon.

Multi-API Support
- Description: The plugin now supports multiple AI APIs, including Gemini, Claude, and OpenAI. This allows you to choose the AI provider that best suits your needs in terms of performance, cost, and features.
- Configuration: You can configure the default API provider and add your API keys in the config.yml file.

Code Blocker
- Description: A new security feature that prevents the AI from providing code snippets in its responses. This is to prevent the AI from being used to generate malicious code that could harm the server or its players.
- Configuration: The Code Blocker can be enabled or disabled in the config.yml file, and the message that is displayed to the player when a code snippet is detected can also be configured.

Addon Support
- Description: The plugin now has a powerful addon system that allows for extending its functionality with new features and commands. This modular approach makes it easy to customize the plugin to your server's specific needs.
- Directory Tree: Addons are placed in the plugins/NSR-AI/addons directory.

Advanced Player Stats Addon
- Description: A new addon that provides a wide range of features for tracking and displaying player statistics.
- Features:
- In-Depth Player Statistics: Track a wide range of player stats, including playtime, kills, deaths, blocks mined, and more.
- Per-Player Privacy: A comprehensive privacy system that allows players to control who can see their stats.
- AFK Tracker: Automatically detects when a player is AFK and notifies administrators.
- Natural Language Commands: Use more natural and intuitive commands to interact with the addon.
- "Did you mean?" for Player Names: Corrects spelling mistakes in player names to make commands easier to use.
----------, Aug 28, 2025

Key Features in NSR-AI v1.0.1
  • Persistent Knowledge Base
    Admins can now “teach” the AI specific facts or responses using simple commands. These custom responses are saved locally and triggered when a player’s question matches a defined keyword — providing accurate, server-specific answers. This system works independently of the external AI API.

  • Enhanced API Error Reporting
    When something goes wrong while contacting the Gemini API, the plugin now returns more detailed and helpful error messages, making it easier for server owners to troubleshoot issues.

  • AI Self-Awareness
    The AI can now respond intelligently to questions like “Who are you?” or “What do you do?”, giving players a predefined answer about its identity and purpose on the server.

  • ⚡ Optimized API Response Time
    API call timeouts have been fine-tuned to 10 seconds, helping reduce lag and ensuring players get faster replies from the AI.

  • Customizable Chat Prefixes
    Server owners have full control over chat prefixes. You can now define unique tags for:
    • AI responses in normal mode

    • Player messages

    • AI responses in admin mode
  • Quick Admin Mode Deactivation
    Admins can now exit admin mode instantly by simply sneaking (crouching) in-game, in addition to disconnecting. This makes toggling special admin features much easier during gameplay.
----------, Aug 6, 2025

Resource Information
Author:
----------
Total Downloads: 261
First Release: Aug 6, 2025
Last Update: May 2, 2026
Category: ---------------
All-Time Rating:
2 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings