
NSR-AI
Gemini + ChatGPT Powered AI Chat for Minecraft: Fast, Smart & Server-Friendly
1.4
release2 мая 2026 г.NSR-AI v1.4 — The Developer Empowerment Update
Plugin Version: 1.4 | API Version: 3.0-pre |
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:
askAIandsendMsgnow run entirely in the background — your server stays at 20 TPS even during complex AI reasoning. - Async Persistence: Saving AI logs via
SaveMsgor 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.ymlstore directly. - Hierarchical Permissions:
read-knowledgeandedit-knowledgenodes 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
onSystemPromptinterceptor to append dynamic instructions to the/aiglobal system prompt. - API Isolation: When an addon calls
askAIorsendMsg, 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/aiexclusively 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.ymlallows 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.ymlfor 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/aiexclusively 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.
🛡️ 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 into enable maximum privacy. This swaps sensitive information (like Player Names and IPs) with random codes (e.g.PlayerName→R2d13n) 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 Requestserrors to cascade to players. Now properly consults theOverloadedKeyManagerbefore 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()andregisterAddon()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 againstSecurityManagerbefore 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()toSecurityManagerso 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
CopyOnWriteArrayListto preventConcurrentModificationExceptionduring 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
NullPointerExceptioncrash 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
validatePluginandvalidateAddoninSecurityManager. 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
ConcurrentHashMapto preventConcurrentModificationExceptionduring 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
PlayerListenerto respect privacy settings — players who opt out of privacy will no longer have their chat logged by the globalChatLogger. - 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/modelsfor OpenAI). - ConversationManager: Fully converted to
CopyOnWriteArrayListfor consistent thread-safe history management.
- Shutdown Persistence: Added explicit save calls in
onDisablefor Knowledge Base and Saved Chats to ensure zero data loss during server restarts.
Utility & Performance Optimization
- Massive Masking Optimization: Refactored
ChatLoggerkey 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
ConcurrentHashMapfor fail-safe async cleanup. - AdminRecipientManager: Implemented
CopyOnWriteArrayListto prevent broadcast crashes.
- ConfirmationManager: Migrated to
- 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
AdminRecipientManagerto handle manual configuration errors gracefully.
Pet System Hardening (Final Stability Pass)
- Performance Overhaul: Refactored
PetListenerchat processing to only scan relevant pets, eliminating O(N) server-wide scans and preventing chat-induced TPS drops. Implemented Regex Pattern caching on thePetobject itself to prevent thousands of expensive regex recompilations during chat events. - RAM Optimization (Lazy Loading): Rewrote
PetDataStorageandPetinventory handling. The server no longer creates empty BukkitInventoryobjects 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
PetManagertoConcurrentHashMap(replacing unsafeHashMapinstances) and implementedThreadLocaldate formatting inPetDataStorage. This entirely eliminates the risk ofConcurrentModificationExceptionduring 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
ConcurrentHashMapand thread-safe data structures. This eliminates the risk ofConcurrentModificationExceptionduring high-frequency AI interactions. - Atomic File Persistence: Implemented
synchronizedfile 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
AddonManagerto eliminate expensive temporary file creation/deletion when scanning addon JARs. Metadata is now read directly from the JAR stream viaInputStreamReader, removing a major source of disk I/O lag and preventing file-lock errors. - API Modernization: Marked the legacy
Addoninterface as@Deprecatedto 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
URLClassLoaderandJarFilehandles are closed properly.
- Memory-Direct Loading: Refactored
- Config & Resource Integrity:
- Resource Leak Fix: Hardened
ConfigUpdaterwith try-with-resources for default configuration streams, preventing stranded file descriptors during repeated plugin reloads. - UTF-8 Enforcement: Standardized on
StandardCharsets.UTF_8for all configuration and addon metadata reading, ensuring consistency across different server locales. - Non-Destructive Updates: Hardened
ConfigUpdaterto be additive-only, safely preserving custom user keys and data across version upgrades.
- Resource Leak Fix: Hardened
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.datapackage (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
ItemStackinventory caching from thePlayerDataobject. 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.
- Inventory Stripping: Removed
- CPU & Lag Prevention:
- Direct Search Algorithm: Optimized
KnowledgeManagersearch logic to perform direct iteration, eliminating expensiveHashMapcopying on every query. - Resource Singletons: Standardized
GsonandOkHttpClientas 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.
- Direct Search Algorithm: Optimized
- Persistence Hardening: Optimized
PlayerDataManagerandConversationManagerto ensure all data is persisted with atomic safety during async operations. - Cryptographic & Utility Speedups:
- Encryption Cache: Implemented a
ConcurrentHashMapcache for PBKDF2 key derivation inEncryptionUtilandSecurityUtil, eliminating massive CPU spikes during data decryption and player-specific key generation. - ThreadLocal Caching: Refactored
ChatLoggerto useThreadLocal<SimpleDateFormat>, preventing thousands of unneeded object allocations per minute during heavy logging. - StringBuilder Refactor: Replaced inefficient string concatenation in
MessageFormatterwithStringBuilder, significantly reducing memory fragmentation and garbage collection pauses. - Randomness & String Optimization: Consolidated
SecureRandomandThreadLocalRandomusage for faster generation. Lifted invariant string transformations out of loops inStringUtiland pre-compiled Regex patterns inUpdateCheckerfor tighter execution.
- Encryption Cache: Implemented a
- Targeted Manager Optimizations:
- ActiveConversation CPU/Memory: Completely removed the
animationFrametracking map fromActiveConversationManager. By utilizing localized closure state within theBukkitRunnable, 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
OkHttpClientandGsoninstantiations, 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 heavyPattern.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.
- ActiveConversation CPU/Memory: Completely removed the
🛠️ Developer API
API Version: 3.0-pre | Fully backward compatible with v1.2 and v1.3 addons.
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.
// 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.
api.askAI(player, "What is the weather today?")
.thenAccept(response -> player.sendMessage(response))
.exceptionally(err -> { err.printStackTrace(); return null; });
4. Knowledge Base (RAG) Access
// 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
// 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
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
// 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. 🎮 ⚡ 🧠
1.3
release1 февраля 2026 г.NSR-AI 1.3: The Hybrid Intelligence Engine – Technical Briefing
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 not just a feature drop; it 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: Note that clicking
[Stop]interrupts the display stream only. Because the request has already been sent to the API provider, tokens are still consumed. Think of it like canceling a broadcast; the signal was already sent, you just stopped listening.
- Technical Detail: Note that clicking
- ✍️ [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, orConcise. The AI will try again with a different perspective.
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.ymlfile 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. If a narrative goes wrong, you can "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." This keeps the AI smart for thousands of messages without causing lag.
- 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. You only pay for the essential context, not redundant history, significantly cutting your API costs.
- Ultra-Fast Processing: Smaller, distilled contexts are processed much faster by AI providers. This reduces the "Thinking" time, delivering answers to your chat in record time.
- Peak Accuracy: Distillation removes the "noise" of old, irrelevant chat data. This prevents the AI from getting confused by outdated topics, ensuring every answer is sharp, factual, and hyper-relevant to the current conversation.
- Multi-API Sovereignty: You are never locked into one brain. 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
/aiacommand portal is your "Control Center." Manage all modular add-ons likeAFK Trackers,Player Stats, orEconomy Bridgesfrom 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. 🎮⚡🧠
1.2.1
release2 декабря 2025 г.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
-
AI Response Handler Bug Some users on v1.2 experienced delayed or incomplete AI replies. This has been fully resolved with optimized pipeline handling.
-
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.
1.2
release16 ноября 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 helpcommand 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 typestore-<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.
- 🟢 Active (
- 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
projectIdor 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.
- If set to
- 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 (
playerchathistoryandadminchathistory) 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
petfolder 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 infeatures.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 theadmin-activation-codeand 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 admincodecommand 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 reloadcommand, 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.txtis now at:plugins/NSR-AI/security/bug.txtbugfix.reloadingis now at:plugins/NSR-AI/security/bugfix.reloadingreserved-nicknames.ymlis now at:plugins/NSR-AI/pets/reserved-nicknames.ymldeath_log.ymlis 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 ✨ 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 themaster_secret.confand theserver.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.
-
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.ymlfiles, named after their Project ID (<project_id>.yml). This player-specific folder also contains the player's uniquemaster.keyandsalt.binfiles, which are crucial for deriving their Player Master Key. -
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.
- First, a unique encryption key (
-
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.keyandsalt.binfiles, adding a crucial layer of individual security.
- 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
-
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
.ymlfile.
- The already-encrypted data from Layer 2 is then encrypted again, this time using the Server Master Key (
-
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 petto view details about your active pet. - Pet Stats: Pets now track
level,xp,health,hunger, andmood. - 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):
-
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 theknowledge.ymlfile, retrieving only the most relevant pieces of information. -
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.
-
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.
1.2-pre
release15 октября 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 tamecommand while looking at a tamed and named pet to link it to the AI. This will allow your pet to start communicating with you. - Unique Nicknames: Give your pets a special nickname with
/ai pet nickname <nickname>. Each pet's nickname must be unique!
Advanced AI-Powered Chat
- Real Conversations: Your pets now have their own AI-powered brain! They will respond to your messages with unique and in-character dialogue.
- Emotional Intelligence: A pet's mood and its bond with you will directly affect its personality. A happy pet with a strong bond will be affectionate and playful, while a neglected pet might be cold and distant.
- Species-Specific Identity: Every pet type has its own unique sound and set of emojis! Wolves will "woof," cats will "meow," and their messages will be full of personality.
- Check Your Pet's Mood: Ask your pet "what is your mood" or "how are you feeling" to get a direct response about its current mood.
New Commands
/ai pet list: See a list of all your linked pets and their status./ai pet info <pet_name>: Get detailed information about a specific pet, including its mood, bond level, and more.
Pet Lifecycle
- Tamed & Linked Dates: Your pet now remembers when it was tamed and when it was linked to the AI. Ask them about it!
- A Pet's Farewell: When a pet is low on health, it will say a heartfelt goodbye. When a pet dies, its link with the AI is broken. If you try to talk to a pet that has passed away, it will respond with a special message.
Ownership
- A Special Bond: Only a pet's true owner can chat with it and change its nickname. Any other player who tries to interact with your pet will be ignored or receive a cold shoulder.
🔑 Per-Player API Keys
- Bring Your Own Key: Players can now add their own API keys for Gemini, OpenAI, or Claude using the
/ai apikeycommand. - Session-Based: Player-provided API keys are only valid for the current session and are never stored on the server.
- Secure: API keys are not visible to admins or in the console.
- Fallback System: If a player has not provided their own API key, the server's global API key will be used as a fallback.
New Commands
/ai apikey: then type the key in the chat to add a temporary API key for your session./ai apikey list: View your active session keys (masked for security)./ai apikey clear: Remove all your active session keys.
🚀 How to Get Started
- Tame a Pet: Tame a wolf, cat, or any other supported animal in Minecraft.
- Give it a Name: Use a nametag to give your new companion a name.
- Link to the AI: Look at your pet and type
/ai pet tame. - Give it a Nickname: Use
/ai pet nickname <nickname>to give your pet a unique nickname. - Start Chatting! Mention your pet's name or nickname in the chat to start a conversation.
We are incredibly excited for you to try out the new Pet Emotional Communication System and form a deeper bond with your furry (and feathery) friends!
🛡️ Automatic Security & Bug Fixer Downloader
NSR-AI now includes a robust, automated system to keep your plugin secure and up-to-date with the latest bug fixes. This system operates silently in the background, ensuring your server benefits from continuous improvements and protection without manual intervention for updates.
How it Works:
- Automatic Security Updates: The plugin periodically checks for updates to its security module. If a new version is available, it will be automatically downloaded and reloaded, ensuring your server always has the latest protections.
- Automated Bug Fixes: The plugin also periodically checks for critical bug fixes for the main plugin. If a new bug fix is available, it will be automatically downloaded.
- Intelligent Version Tracking: A dedicated
bug.txtfile tracks the installed bug-fix version, preventing redundant downloads and ensuring efficient updates. - Server Restart for Main Plugin Updates: For bug fixes that involve changes to the main plugin's core code, a server restart will be required to fully apply the update. The plugin will clearly notify you in the console when a restart is needed.
- Transparent Logging: The system provides clear log messages in your server console, informing you about update checks, downloads, and when a restart is required.
This ensures your NSR-AI experience is always stable, secure, and running the latest enhancements.
