Welcome to the Hangar Open Beta. Please report any issue you encounter on GitHub!
Async AI bridge for Paper via PlaceholderAPI: unique answer pools, TTL cache, prewarm.
Bug-fix release: dialogue memory saves on Paper 26.2, broken characters no longer block saves of dialogue memory and pool.yml, reliable plugin events, a cleaner server stop and the startup-banner option is back. Two optional log lines help with diagnostics. Everyone on 1.3.0 or 1.2.x can update. Missing keys are appended to config.yml automatically, it stays at config-version: 2, and NexusAIApi.API_VERSION stays 3.
Upgrading
- Replace
NexusAI-1.3.0.jarwithNexusAI-1.3.1.jarand restart. Commands, placeholders and the API are unchanged. - You do not need to edit
config.yml, and do not changeconfig-version. On startup and/nai reload, missing keys are copied from the jar default. From 1.3.0, three keys are appended:startup-banner,context.log-timeoutsanddialogue.log-stop-budget(alltrue). From 1.2.x, 22 keys are appended. The log showsAdded missing config keys: …, and that start writes oneconfig.yml.bak(orconfig.yml.bak.<timestamp>). Values you already set and your comments stay. - The defaults keep 1.3.0 behaviour: the full startup banner is printed. The two new log lines are on, and each can be turned off on its own.
- To roll back: stop the server, put
NexusAI-1.3.0.jarback and start it.config.ymlcan stay as it is: 1.3.0 ignores the three new keys. To drop them from the file, restore theconfig.yml.bakwritten by the 1.3.1 start. Details are indocs/migration-1.3.1.md.
Dialogue memory
- Fix: on Paper 26.2, which ships SnakeYAML 2.6,
dialogue-memory.ymlwas not saved at all while memory held text with U+2028, U+2029, U+0085,\ror another control character. Periodic saves and stop wrote nothing, so the dialogue of that session was lost. Such text is now written double-quoted with escapes, as on Paper 1.20.6 to 1.21.x and Folia. Every other value is written exactly as before. - Fix: a save that cannot turn memory into YAML now logs
Failed to save dialogue-memory.yml (…)at WARNING and leaves the file as it was. Other save errors logSkipped dialogue memory save (…)at WARNING instead of FINE. Neither line contains dialogue text. - Fix:
\r\nand a lone\rin model replies and greetings are stored as\n. - Fix: log lines with a count of one use the singular (
1 dialogue character,1 stale … temp file). - When the server stops during the first load of
dialogue-memory.yml, stop logs one INFO line with the stop budget, the file size, the time used and how many dialogue characters were saved.dialogue.log-stop-budget: falseturns it off.
Text encoding and saves
- Fix: a lone UTF-16 surrogate, usually an emoji cut in half by the memory length cap, stopped every save of
dialogue-memory.yml. Length cuts now keep surrogate pairs whole, and a lone surrogate is stored and written as U+FFFD. If YAML still cannot write one dialogue character, only that character is left out, with one WARNING per save, and the rest of the file is saved. - Fix: a lone surrogate in one model reply stopped every save of
pool.yml, so new pool answers were lost on restart. Replies are now cleaned before they reach the cache and the pool. The same fix applies tomoderation.log,actions.logandusage.yml. - Fix: a provider or model name with a lone surrogate is loaded with U+FFFD and one warning, so
usage.ymlandtoken-usage.ymlno longer get duplicate rows. Duplicate rows written by 1.3.0 are added together on load. - Fix:
/nai importno longer copies? idlines into the prompt above, soprompts.ymldoes not get the same id twice. An import with an escaped lone surrogate no longer fails. - Files and lines without lone surrogates are written byte for byte as before.
Events
- Fix:
NexusPostGenerateEventandNexusGenerateFailEventfor a placeholder request were sometimes not fired when the reply was already complete. That completion now moves to anexusai-http-*worker, so Post still fires before the text is cached. - Fix: an event that Bukkit refuses to deliver is now logged at WARNING with the event name, at most 3 times per event type in 5 minutes, instead of being dropped without a log line.
Server stop
- Fix: on stop with AI requests still waiting for the provider, late replies no longer log
AI completion handler failedorFailed to schedule a command result. Disable cancels every open request at once and logs one INFO line with the counts. Stop no longer waits up to 7 s. - The
talkAPI future fails withIllegalStateException"NexusAI is stopping" instead of returning the busy text. Replies still in flight at stop are lost.
Startup banner
startup-bannerinconfig.ymlis back as a boolean.true(default) prints the full console banner, as in 1.3.0.falselogs one line instead:NexusAI enabled. Ready in N ms. Any other value logs one warning and usestrue.
Logging and docs
- A context provider call that overruns its timeout now logs one INFO line, at most once per
limits.error-log-cooldown-secondsper provider.context.log-timeouts: falseturns it off. docs/limitations.mdadds sections on world context cost and context provider timeouts.docs/faq.mdexplains the dialogue memory stop budget and that Java 25 is needed for every 26.x server. The docs also describe the new log lines.
Known issues
- The player-input boundary and the reply filter reduce prompt-injection risk. They do not eliminate it.
- An HTTP 429 on one model pauses its whole provider. Put
fallback-modelon a different provider so/nai talkcan still answer. /nai testrun over RCON returns onlySending a test request.... The answer reaches the console and the player a moment later.- Live structured output was checked only with Groq. OpenRouter, OpenAI and Ollama use the same code path but were not checked against the live service.
- Limits and best practices for plugin authors are in
docs/limitations.md.
Compatibility
- Paper and Purpur 1.20.6–26.3; Folia 1.21.8, 1.21.11, 26.1.2 and 26.2 only; Java 21 or newer (Java 25 on 26.x)
- PlaceholderAPI 2.11.6+ (soft-depend); on Folia 2.11.7+
- Tested on Paper 1.20.6, Paper 26.3 and Folia 26.2, including an upgrade from 1.3.0. CI on the release commit also starts the plugin on Paper 1.20.6, 1.21.1, 1.21.4, 1.21.8 and 26.2, and on Folia 1.21.8, 1.21.11, 26.1.2 and 26.2.
- Spigot and CraftBukkit are not supported.
Download
NexusAI-1.3.1.jar, SHA-256 c5336378c8fa54993abf7f1e28faf535e12a60b6c7a039e520c993fac00f0e50
Full history: CHANGELOG.md
Platforms
Paper
1.20.6–26.3
Dependencies
Paper
- PlaceholderAPI Optional