? VelocityDiscord
VelocityDiscord 是一款功能强大且可扩展的插件,可将你的 Velocity 代理直接连接到 Discord,实现 Minecraft 网络与 Discord 服务器之间的实时通信和自动化操作。
该插件在设计时充分考虑了稳定性、性能以及未来的扩展性,使其既适用于小型代理网络,也适用于大型代理网络。
✨ VelocityDiscord 能做什么?
VelocityDiscord 充当 Velocity 与 Discord 之间的桥梁。它允许你的代理将信息、更新和事件直接发送到 Discord 频道,从而为工作人员和社区成员提供更好的透明度和互动体验。
该插件提供了一个清晰的基座,可以通过添加玩家追踪、服务器状态更新、管理日志等功能进行扩展。
? 核心特性
-
? Discord Bot 集成
- 使用机器人令牌连接至 Discord
- 向可配置的 Discord 频道发送消息
-
? Velocity 代理集成
- 监听核心 Velocity 事件
- 设计用于支持玩家、服务器和网络事件
-
⏱ 任务调度
- 利用 Velocity 的调度器执行周期性任务
- 非常适合自动化更新,例如更改 Discord 主题或状态消息
-
⚙️ 配置系统
- 简单明了的配置设置
- 轻松配置 Discord 机器人令牌和频道 ID
-
? 技术细节
- 专为 Velocity 代理构建
- 针对性能和长期稳定性进行了优化
- 正确处理插件启动和关闭的生命周期
- 安全且结构化的调度器使用方式
- 已准备好用于生产环境
-
? 预期用途
- VelocityDiscord 完美适用于:
- 使用 Velocity 的 Minecraft 网络
- 希望从代理获取 Discord 更新的工作人员团队
- 寻找稳固 Discord 集成基础的开发者
- 计划在未来进行高级 Discord 自动化的服务器
-
? 安装
- 从 Modrinth 下载插件
- 将 .jar 文件放入你的 Velocity 插件文件夹中
- 启动代理一次以生成配置文件
- 配置你的 Discord 机器人令牌和频道 ID(别忘了在机器人设置中启用所有 Intents)
- 重启 Velocity
-
? 注意事项
- 该项目正在积极开发中
- 欢迎提供反馈和功能请求
- 旨在随着你的网络共同成长
标准配置文件如下所示:
config-version: 2
# -----------------------------------------------------
# Config version
# Used for future migrations
# Do NOT change this manually
# -----------------------------------------------------
# =====================================================
# VelocityDiscord - Configuration
# =====================================================
# Everything in this file can be customized
#
# Placeholders are automatically replaced.
# If something is configured incorrectly,
# the plugin will use safe default values.
# =====================================================
# -----------------------------------------------------
# Discord bot settings
# -----------------------------------------------------
discord:
# Discord bot token
# Obtain this via https://discord.com/developers/applications
# WARNING: NEVER share this with others
token: "PUT_DISCORD_BOT_TOKEN_HERE"
# Discord guild (server) ID
# This is the Discord server where the bot is active
guild-id: 0
# Discord channel ID for server notifications
# Also used as fallback when multiple servers share one channel
channel-id: 0
# Discord bot status
# Examples:
# "Watching Velocity"
# "Playing Minecraft"
# "Listening to chat"
status: "Watching Velocity"
# -------------------------------------------------
# Discord role → Minecraft chat prefix
# -------------------------------------------------
roles:
admin:
role-id: 1447273936982245397
prefix: "<red>[Support]</red>"
priority: 100
moderator:
role-id: 987654321098765432
prefix: "<blue>[Mod]</blue>"
priority: 80
# -------------------------------------------------
# Discord → Minecraft chat settings
# -------------------------------------------------
chat:
# Chat format for messages sent from Discord
# to Minecraft
#
# Available placeholders:
# {user} - Discord username
# {message} - The Discord message
#
# Example output:
# [Discord] <Assausive> Hello everyone!
format: "[Discord] <{user}> {message}"
# -----------------------------------------------------
# Minecraft → Discord chat settings
# -----------------------------------------------------
chat:
# Enable/disable Minecraft chat → Discord
enabled: true
# Chat format for messages sent from Minecraft
#
# Available placeholders:
# {server} - Velocity server name
# {player} - Player name
# {message} - Chat message
#
# Example output:
# [survival] <Steve> Hello Discord!
format: "[{server}] <{player}> {message}"
# Servers whose chat should NOT be sent to Discord
#
# Use the exact server names
# as defined in velocity.toml
ignored-servers:
- deve
- test
- dev
luckperms:
# Enable LuckPerms integration
# If false or LuckPerms is not installed,
# the plugin will automatically fall back
enabled: true
# Show LuckPerms prefix in Discord chat
show-prefix: true
# Show LuckPerms suffix in Discord chat (optional)
show-suffix: false
# What to do with color codes from LuckPerms
# STRIP = remove colors (&c, §c, etc.)
# KEEP = keep as plain text (no colors)
# MINIMESSAGE = convert to MiniMessage (advanced)
color-mode: STRIP
# Fallback prefix if player has no LuckPerms prefix
fallback-prefix: ""
# -----------------------------------------------------
# 加入 / 离开 / 切换设置
# -----------------------------------------------------
join-leave:
# 当玩家
# 加入网络时发送消息
join-enabled: true
# 当玩家
# 离开网络时发送消息
leave-enabled: true
# 当玩家
# 切换服务器时发送消息(例如:大厅 → 生存)
switch-enabled: true
# -------------------------------------------------
# 加入 / 离开 / 切换消息(嵌入卡片)
# -------------------------------------------------
messages:
# 玩家加入时的消息
#
# 可用占位符:
# {player} - 玩家名称
# {server} - 服务器名称
join: "{player} 加入了 {server}"
# 玩家离开时的消息
leave: "{player} 离开了 {server}"
# 玩家切换服务器时的消息
#
# 可用占位符:
# {from} - 原服务器
# {to} - 新服务器
switch: "{player} 从 {from} 切换到了 {to}"
# -----------------------------------------------------
# 嵌入卡片颜色(十六进制)
# -----------------------------------------------------
embeds:
# 加入消息的颜色(默认绿色)
join-color: "#2ecc71"
# 离开消息的颜色(默认红色)
leave-color: "#e74c3c"
# 切换消息的颜色(默认黄色)
switch-color: "#f1c40f"
# -----------------------------------------------------
# 各服务器的 Discord 频道
# -----------------------------------------------------
# 在这里,你可以为每个 Minecraft 服务器配置独立的 Discord 频道
#
# 无限制,无需编写代码
#
# 示例:
#
# servers:
# survival:
# channel-id: 111111111111111111
#
# lobby:
# channel-id: 222222222222222222
#
# creative:
# channel-id: 333333333333333333
#
# 如果某个服务器未在此处列出,
# 插件将使用 discord.channel-id 中的设置
# -----------------------------------------------------
servers: {}
# -----------------------------------------------------
# 服务器与代理状态嵌入卡片
# -----------------------------------------------------
status-embeds:
# 后端服务器启动
server-start:
enabled: true
title: "? 服务器已上线"
message: "服务器 **{server}** 已成功启动。"
color: "#2ecc71"
# Velocity 代理启动
proxy-start:
enabled: true
title: "? 代理已上线"
message: "**Velocity 代理** 已成功启动。"
color: "#95a5a6"
# Velocity 代理停止
proxy-stop:
enabled: true
title: "⚫ 代理已离线"
message: "**Velocity 代理** 已离线。"
color: "#34495e"
# -----------------------------------------------------
# Discord 频道主题(描述)
# -----------------------------------------------------
channel-topic:
enabled: true
# 强制更新主题的频率(秒)
refresh-interval: 30
# 防垃圾延迟(秒)
update-delay: 10
fallback-format: "? 网络在线 | ? 在线玩家数:{players}"
server-format: "? {server} | ? 在线玩家数:{players}"
# -----------------------------------------------------
# 调试设置
# -----------------------------------------------------
debug:
# 启用额外日志记录
#
# 适用于以下情况:
# - Discord 连接问题
# - 聊天转发故障
# - 回复系统调试
#
# 不建议在生产服务器上启用
enabled: false
你是这个资源的作者?登录后可认领此资源。
相似资源
PacketEvents 是一款专为 Minecraft Java 版打造的协议库,旨在简化数据包的处理与传输。
ExyliaPlugins 的库。
通过对话框或铁砧界面帮助你的 Anthme
重新定义服务器上的生物运输方式。使用高度可定制的口袋道具,安全地捕获、存储和释放任何实体。
为基于 Spigot/Paper/Folia 的服务器添加对 Vivecraft 的支持
用于绘制游戏内地图或在浏览器中随探索实时进行地图绘制的实时地图。
评论 0
登录后参与评分
还没有评论,来抢沙发吧