Openrouter Chat 图标

Openrouter Chat

作者:rebot | 分类:模组

价格:0 墨喵币 下载量:0 点赞:0 版本 0.1.1
本资源为搬运资源,原资源地址: https://modrinth.com/mod/openrouter-chat
资源信息

Minecraft 版本: 1.21 1.21.1 1.21.2 1.21.3 1.21.4 1.21.5 1.21.6 1.21.7 1.21.8 1.21.9 1.21.10 1.21.11

平台: paper

标签: game-mechanics social utility

资源介绍

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.

Features

  • Direct OpenRouter API integration
  • Single-turn prompts only (no conversation memory between messages)
  • No bundled secrets or API keys
  • Operator command to save the API key from in-game or the server console
  • Configurable model, system prompt, timeout, and chat formatting
  • Permission nodes for normal usage vs management
  • Optional ops-only-chat toggle that requires operator status on top of the use permission

Setup

  1. Download the jar from Releases
  2. Put it in your server's plugins/ folder
  3. Restart the server
  4. Set your OpenRouter API key using either:
    • config file: plugins/OpenRouterChat/config.yml
    • in-game (as op) or from the server console: /openrouter add-key <your-key>

Commands

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 status

Aliases:

  • /orc
  • /llm

Permissions

  • openrouterchat.use
    • Allows using /openrouter <message>
    • Default: op
  • openrouterchat.manage
    • Allows /openrouter add-key, clear-key, reload, and status
    • Default: op

Config

api-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.

Build

mvn clean package

Output:

target/paper-openrouter-chat-0.1.0.jar

Compatibility

  • Written for Paper 1.21.4
  • Confirmed working on Paper 26.1.2
  • Java 21
下载太慢?试试 墨喵加速站,支持 Modrinth 和外网直链高速下载! 用的人越多,下载的越快!
下载与版本
评论(0)
登录 后发表评论。

暂无评论,抢个沙发吧~

举报此资源

请登录后举报

🔥 相关推荐
Block Storm

价格:0 墨喵币
下载量:0

查看详情
Yume

价格:0 墨喵币
下载量:0

查看详情
AnimationRecorder

价格:0 墨喵币
下载量:0

查看详情
Echo+

价格:0 墨喵币
下载量:0

查看详情