
用于创建 AI 定制加入与离开消息的插件
LLMNotifications 使用 AI 为玩家生成有趣且个性化的加入和离开消息。
它可以使用:
- 在服务器上运行的本地 AI(Ollama),或者
- 云端 AI,如 OpenAI 或 Anthropic。
消息可以包含玩家和服务器的信息,例如名称、世界、游戏时长等。
示例提示词:
写一首有趣的四行诗来欢迎 @player 加入服务器。提及他们的世界 (@world)。
你还可以使用玩家记忆功能存储关于玩家的额外信息,例如爱好或喜爱的音乐,从而让 AI 更加个性化地生成消息。
快速开始
- 将插件 jar 文件放入服务器的
plugins 文件夹中。
- 启动服务器一次。
- 打开
plugins/MinecraftLLMNotifications/config.yml。
- 选择一个 AI 提供商和模型。
- 编辑提示词。
- 运行
/llmnotifyreload。
功能特性
-
AI 生成的消息适用于:
-
每个事件可设置多个提示词(随机选择)
-
支持本地 AI 或云端 AI
-
支持玩家和服务信息的占位符
-
AI 失败时的安全备用消息
-
可选的玩家记忆系统以实现个性化消息
配置
当插件首次运行时,它会创建以下文件:
plugins/MinecraftLLMNotifications/config.yml
在该文件中你可以:
- 选择你的 AI 提供商
- 选择模型
- 自定义提示词
- 配置备用消息
- 启用或禁用玩家记忆
请浏览文件中的注释以了解每个选项的解释。
示例提示词
首次加入
- 用一首简短有趣的诗歌欢迎 @player 加入服务器。
加入
- 为 @player 写一条讽刺风格的回归欢迎消息。
离开
- 为离开 @world 的 @player 写一条戏剧性的告别消息。
保持消息简短通常能获得最佳聊天效果。
玩家记忆
你可以存储关于玩家的额外信息,供 AI 在生成消息时使用。
示例:
示例命令:
/llmnotifymemory add Steve loves cheese
AI 在生成消息时将自动获取这些信息。
支持的提示词占位符
你可以在提示词和备用消息中使用以下内容:
@player
@display_name
@uuid
@world
@x, @y, @z
@health
@food
@level
@gamemode
@online_count
@is_op
@first_join
@last_played
@playtime_hours
@player_memory
更好的提示词技巧
- 保持输出简短以便适应聊天窗口。
- 如果需要,指定行数。
- 描述你想要的语气(有趣、讽刺、戏剧性等)。
示例:
Write a short medieval themed welcome message for @player in 3 lines.
命令
| 命令 |
描述 |
/llmnotifyreload |
重新加载插件配置 |
/llmnotifymemory list <player> |
显示某玩家的已存储记忆 |
/llmnotifymemory add <player> <item> |
添加关于玩家的信息 |
/llmnotifymemory remove <player> <item> |
移除一项记忆 |
/llmnotifymemory clear <player> |
清除某玩家的记忆 |
/llmnotifymemory clearall |
清除所有玩家的记忆 |
Ollama 帮助
如果你选择使用自己本地托管的 Ollama 服务器(你需要知道如何设置它),在插件首次加载时创建的配置文件中有一些特定的 Ollama 设置:
ollama:
base-url: "http://127.0.0.1:11434"
# 这里有一些专为幽默和讽刺设计的小型模型
model: "MeaTLoTioN/LisaBot"
# 可选:Ollama 应保持模型加载的时间(示例:"5m", "30m", "1h", "0")
keep-alive: "1h"
# 可选:定期向 Ollama 发送微小的生成请求以保持模型活跃
keepalive-ping-enabled: true
# 启用后保持活跃任务的频率(秒)
keepalive-ping-interval-seconds: 300
保持活跃可以防止你的 Ollama 模型卸载,因为某些模型的初始加载时间可能较慢,导致插件超时。你也可以增加配置文件中的 request-timeout-seconds 设置。

Plugin to Create AI Customized Join & Quit Messages
LLMNotifications generates funny, customised join and quit messages for players using AI.
It can use:
- a local AI running on your server (Ollama), or
- cloud AI such as OpenAI or Anthropic.
Messages can include player and server information such as name, world, playtime and more.
Example prompt:
Write a funny 4-line rhyme to welcome @player to the server. Mention their world (@world).
You can also store extra information about players using the player memory feature, such as hobbies or favourite music, allowing the AI to personalise messages even more.
Quick Start
- Put the plugin jar in your server
plugins folder.
- Start the server once.
- Open
plugins/MinecraftLLMNotifications/config.yml.
- Choose an AI provider and model.
- Edit the prompts.
- Run
/llmnotifyreload.
Features
-
AI generated messages for:
- first join
- returning join
- player quit
-
Multiple prompts per event (chosen randomly)
-
Works with local AI or cloud AI
-
Placeholder support for player and server information
-
Safe fallback messages if the AI fails
-
Optional player memory system for personalised messages
Configuration
When the plugin first runs it creates:
plugins/MinecraftLLMNotifications/config.yml
In this file you can:
- choose your AI provider
- select the model
- customise prompts
- configure fallback messages
- enable or disable player memory
Look through the file for comments explaining each option.
Example Prompts
First Join
- Welcome @player to the server with a short funny rhyme.
Join
- Write a sarcastic welcome back message for @player.
Quit
- Write a dramatic goodbye message for @player leaving @world.
Keeping messages short usually works best for chat.
Player Memory
You can store extra information about players that the AI can use when generating messages.
Examples:
- favourite music
- hobbies
- running jokes on the server
Example:
/llmnotifymemory add Steve loves cheese
The AI will automatically see this information when generating messages.
Supported Prompt Placeholders
You can use these in prompts and fallback messages:
@player
@display_name
@uuid
@world
@x, @y, @z
@health
@food
@level
@gamemode
@online_count
@is_op
@first_join
@last_played
@playtime_hours
@player_memory
Tips for Better Prompts
- Keep output short so it fits in chat.
- Ask for a specific number of lines if needed.
- Describe the tone you want (funny, sarcastic, dramatic, etc).
Example:
Write a short medieval themed welcome message for @player in 3 lines.
Commands
| Command |
Description |
/llmnotifyreload |
Reload the plugin configuration |
/llmnotifymemory list <player> |
Show stored memory for a player |
/llmnotifymemory add <player> <item> |
Add information about a player |
/llmnotifymemory remove <player> <item> |
Remove a memory item |
/llmnotifymemory clear <player> |
Clear a player's memory |
/llmnotifymemory clearall |
Clear memory for all players |
Ollama Help
If you choose to use your own locally hosted ollama server (you will need to know how to set this up). There are some Ollama specific settings in the config file that is created when the plugin first loads:
ollama:
base-url: "http://127.0.0.1:11434"
# there are some great small models designed for humour and sarcasm
model: "MeaTLoTioN/LisaBot"
# Optional: how long Ollama should keep the model loaded (examples: "5m", "30m", "1h", "0")
keep-alive: "1h"
# Optional: periodically ping Ollama with a tiny generation request to keep model warm
keepalive-ping-enabled: true
# Frequency for keepalive ping task when enabled
keepalive-ping-interval-seconds: 300
The keep alives stop your Ollama model from unloading as the initial load time for some models may be slow enough that the plugin times out. You can also increase the request-timeout-seconds setting in the config file.
评论 0
登录后参与评分
还没有评论,来抢沙发吧