A Paper plugin that lets players chat with an OpenRouter model directly from inside the game.
A Paper plugin that lets players send a prompt to an OpenRouter model and receive the reply in chat. Each /openrouter invocation is a single, stateless request — the plugin does not keep conversation history between messages.
ops-only-chat toggle that requires operator status on top of the use permissionplugins/ folderplugins/OpenRouterChat/config.yml/openrouter add-key <your-key>The /openrouter <message> form must be run by a player so the response can be delivered to them. The management subcommands (add-key, clear-key, reload, status) can be run from either an in-game player with the manage permission or the server console.
/openrouter <message> — send a prompt to the configured OpenRouter model (player only)/openrouter add-key <api-key> — save the OpenRouter API key/openrouter clear-key — remove the stored API key/openrouter reload — reload config/openrouter status — view current statusAliases:
/orc/llmopenrouterchat.use/openrouter <message>opopenrouterchat.manage/openrouter add-key, clear-key, reload, and statusopapi-key: ""
model: "openai/gpt-4.1-mini"
site-url: ""
site-name: "Paper OpenRouter Chat"
system-prompt: "You are a helpful Minecraft server assistant. Keep answers concise and useful for in-game chat."
max-tokens: 300
temperature: 0.7
timeout-seconds: 45
response-prefix: "&b[OpenRouter] &f"
error-prefix: "&c[OpenRouter] &7"
thinking-message: "&e[OpenRouter] &7&oThinking..."
ops-only-chat: false
ops-only-chat is an extra gate on top of the openrouterchat.use permission. When set to true, only server operators can run /openrouter <message>, even if non-op players have been granted openrouterchat.use. When false (the default), the permission node alone controls access.
mvn clean package
Output:
target/paper-openrouter-chat-0.1.0.jar
1.21.426.1.221