RMotd

RMotd

你可以按下刷新按钮,自定义每日焕新消息。

🎲 RMotd

一个用于提供轮换 MOTD(每日消息)并允许服务器管理员在运行时管理 MOTD 的小型 Minecraft 服务器插件。

🤑 功能

  • 从 config.yml 轮换 MOTD(轮询)。
  • /randommotd 命令:开启/关闭随机轮换。
  • /motd create <name> <motd...> 命令:在运行时向 config.yml 添加新的 MOTD。
  • /motd reload 命令:重新加载 config.yml。

🖌️ 配置

random_motd_enabled: true
motds:
  - "<gradient:red:blue>Welcome to our server!</gradient>"
  - "<yellow>Explore the world of Minecraft with us!</yellow>"
  - "<green>Join us and have fun!</green>"

messages:
  invalid_input: "<red>Invalid input, Please use 'true' or 'false'</red>"
  setting_updated: "<green>Random MOTD feature updated to <status></green>"

🕹️ 命令

  • /randommotd — 切换随机 MOTD 轮换(读取/写入 config.yml 中的 random_motd_enabled)。

    • 权限:rmod.randommotd(在 plugin.yml 中声明)。
  • /motd create <name> <motd...> — 向 config.yml 中的 motds 添加一条 MOTD 条目并保存。目前 <name> 仅用于确认消息中。将 MOTD 内容作为剩余参数提供。

    • 示例:/motd create welcome <green>Welcome to our server!</green>
    • 默认仅限管理员(只有 op 或控制台可以运行)。如果你希望基于权限进行控制,请参阅下方的权限部分。
  • /motd reload — 从磁盘重新加载 config.yml。仅限管理员。

🎭 权限

  • rmod.randommotd — 用于 randommotd 命令。
  • rmod.motd — 为 /motd 保留(plugin.yml 中有记录)。目前插件对 /motd 强制执行仅限管理员使用;如果你希望改用权限控制,请在 MotdCommand 中将检查改为 sender.hasPermission("rmod.motd")。