这是适用于 Velocity 代理服务器的好友系统,允许玩家管理好友关系、发送消息并在多个服务器之间进行互动。
1.4.1 版本更新内容:
- 个人服务器切换通知开关 - 玩家现在可以单独启用/禁用服务器切换通知
- 服务器别名系统 - 在配置文件中用自定义显示名称替换技术性服务器名称
- 管理员消息监听功能 - 通过受权限保护的
/friend watch <player> 命令监控私聊消息
- 增强 MySQL 支持 - 完全支持数据库密码中的特殊字符 (
" \ # ; : / ? & | $)
- 所有消息支持十六进制颜色代码 - 可在
config.yml 的任何位置使用 <#RRGGBB>(MiniMessage 风格)或 &#RRGGBB(BungeeCord 风格)
- MySQL 自动重连 - 如果插件与数据库断开连接后重新上线,插件会自动重连(尝试间隔 30 秒冷却期,无数据丢失)
- 修复过期的 MySQL 连接问题 - 添加了 HikariCP 保活、最大生命周期和连接验证,以防止数据库空闲后出现静默失败
- 修复活动状态(在线/AFK/DND)未保存到 MySQL 的问题 - 此前仅存储在内存中,每次重启都会重置
- 可配置的加入服务器动作:直接连接或执行自定义命令
- 修复了现有配置文件从
server_aliases 迁移新设置的配置迁移问题
命令:
/friend add <player> - 发送好友请求
/friend accept <player> - 接受好友请求(支持离线玩家)
/friend deny <player> - 拒绝好友请求
/friend remove <player> - 移除好友
/friend list - 查看所有好友的在线状态和所在服务器(点击即可加入!)
/friend requests - 显示待处理的好友请求
/friend msg <player> <message> - 发送私聊消息
/friend reply <message> - 回复最后一条消息
/friend broadcast <message> - 向所有在线好友广播消息
/friend status [active|afk|dnd] - 设置你的活动状态
/friend settings - 打开交互式设置菜单
/friend version - 检查插件版本及更新
/friend reload - 重新加载配置(仅限管理员)
权限:
- friends.use - 使用好友系统的基本权限
- friends.reload - 重新加载插件配置的权限
设置菜单:
玩家可以自定义其体验,选项包括可切换的功能:
- 好友请求 - 启用/禁用接收好友请求
- 通知 - 切换好友在线/离线通知
- 消息 - 启用/禁用好友消息
- 状态消息 - 设置对好友可见的自定义状态
插件消息 API:
该插件为 Spigot/Paper 服务器提供完整的 API,用于与好友系统进行交互:
可用请求:
- GET_FRIENDS - 检索所有好友及其名称和在线状态
- GET_ONLINE_FRIENDS - 仅获取在线好友
- GET_SETTINGS - 获取玩家的设置和状态消息
- UPDATE_SETTING - 从后端服务器更改玩家设置
- GET_PENDING_REQUESTS - 列出所有待处理的好友请求
- ARE_FRIENDS - 检查两名玩家是否为好友
自动事件:
- FRIEND_ONLINE - 当好友上线时触发
- FRIEND_OFFLINE - 当好友下线时触发
- FRIEND_SERVER_SWITCH - 当好友切换服务器时通知(1.2.0 新增)
- FRIEND_REQUEST - 收到新好友请求时发送
- SETTING_CHANGED - 设置更新时通知
存储选项:
选择 JSON 文件或 MySQL 数据库:
JSON 模式(默认):
MySQL 模式:
- 可扩展的数据库存储
- HikariCP 连接池
- 适合较大的网络
- 表结构:friendships, pending_requests, player_settings, player_names
特性:
- Velocity 网络的跨服务器好友系统
- 实时版本检查器 - 通过自动版本通知保持更新
- 活动状态系统 - Active、AFK 和 DND 模式,带有视觉指示器
- 服务器显示 - 查看每位好友所在的服务器
- 点击加入 - 通过点击好友服务器瞬间加入
- 离线支持 - 接受来自离线玩家的好友请求
- 带可点击通知的服务器切换跟踪
- 好友之间的私聊
- 向所有在线好友广播消息
- 每个玩家的可定制设置
- 离线玩家名称显示
- 用于审核的控制台日志记录
- 支持连接池的 MySQL
- 简单的 JSON 回退机制
- 用于自定义集成的插件消息 API
- 自动用户名缓存
- 交互式设置菜单
- 可配置的通知(加入/离开/服务器切换)
- 灵活的消息自定义,空条目自动禁用
PlaceholderAPI 支持(新增!):
使用随附的配套插件,在记分板、全息图、聊天等中显示好友数据:
可用占位符:
- %friends_online% # 在线好友数量
- %friends_total% # 好友总数
- %friends_offline% # 离线好友数量
- %friends_online_list% # 逗号分隔的在线好友列表
- %friends_online_servers% # 唯一服务器计数
要找到适用于 Spigot/Paper 服务器的配套插件,只需点击插件的一个版本(点击“Version”,然后例如“1.4.1-SNAPSHOT-3”),在“Files”下你会发现插件和配套插件均可下载。
支持的 Velocity 版本:
Velocity 3.3.0 及以上版本(Java 17+)
设置时的重要事项:
- 在
config.yml 中选择存储类型(json 或 mysql)
- 如果使用 MySQL,请配置数据库凭据
- 重启代理服务器
- 可选:使用插件消息 API 集成到 Spigot/Paper 插件中
如果您有任何问题、建议或对新插件的请求,请在 Discord 上给我发消息。
This is a friends system for Velocity proxy servers that allows players to manage friendships, send messages, and interact across multiple servers.
What's New in Version 1.4.1:
- Personal server switch notification toggle - Players can now enable/disable server switch notifications individually
- Server alias system - Replace technical server names with custom display names in the config
- Admin message spy feature - Monitor private messages with permission-protected
/friend watch <player> command
- Enhanced MySQL support - Full support for special characters in database passwords (
" \ # ; : / ? & | $)
- Hex color support in all messages - Use
<#RRGGBB> (MiniMessage style) or &#RRGGBB (BungeeCord style) anywhere in config.yml
- MySQL auto-reconnect - Plugin automatically reconnects to the database if it goes offline and comes back (30-second cooldown between attempts, no data loss)
- Fixed stale MySQL connections - Added HikariCP keepalive, max lifetime, and connection validation to prevent silent failures after the database is idle
- Fixed activity status (Active/AFK/DND) not being saved to MySQL - Was previously only stored in memory and reset on every restart
- Server join action configurable: direct connection or custom command
- Fixed config migration for new settings in
server_aliases from existing configs
Commands:
/friend add <player> - Send a friend request
/friend accept <player> - Accept a friend request (works with offline players)
/friend deny <player> - Deny a friend request
/friend remove <player> - Remove a friend
/friend list - View all friends with online status and server location (click to join!)
/friend requests - Show pending friend requests
/friend msg <player> <message> - Send a private message
/friend reply <message> - Reply to the last message
/friend broadcast <message> - Message all online friends
/friend status [active|afk|dnd] - Set your activity status
/friend settings - Open the interactive settings menu
/friend version - Check plugin version and updates
/friend reload - Reload configuration (admin only)
Permissions:
- friends.use - Basic permission to use the friends system
- friends.reload - Permission to reload the plugin configuration
Settings Menu:
Players can customize their experience with toggleable options:
- Friend Requests - Enable/disable receiving friend requests
- Notifications - Toggle friend online/offline notifications
- Messages - Enable/disable friend messages
- Status Message - Set a custom status visible to friends
Plugin Messaging API:
The plugin provides a complete API for Spigot/Paper servers to interact with the friends system:
Available Requests:
- GET_FRIENDS - Retrieve all friends with names and online status
- GET_ONLINE_FRIENDS - Get only online friends
- GET_SETTINGS - Fetch a player's settings and status message
- UPDATE_SETTING - Change player settings from backend servers
- GET_PENDING_REQUESTS - List all pending friend requests
- ARE_FRIENDS - Check if two players are friends
Automatic Events:
- FRIEND_ONLINE - Triggered when a friend comes online
- FRIEND_OFFLINE - Triggered when a friend goes offline
- FRIEND_SERVER_SWITCH - Notified when a friend switches servers (NEW in 1.2.0)
- FRIEND_REQUEST - Sent when receiving a new friend request
- SETTING_CHANGED - Notified when settings are updated
Storage Options:
Choose between JSON files or MySQL database:
JSON Mode (Default):
- Simple file-based storage
- No external dependencies
- Perfect for smaller networks
MySQL Mode:
- Scalable database storage
- HikariCP connection pooling
- Ideal for larger networks
- Tables: friendships, pending_requests, player_settings, player_names
Features:
- Cross-server friend system for Velocity networks
- Live version checker - Stay updated with automatic version notifications
- Activity status system - Active, AFK, and DND modes with visual indicators
- Server display - See which server each friend is on
- Click-to-join - Instantly join your friends by clicking their server
- Offline support - Accept friend requests from offline players
- Server switch tracking with clickable notifications
- Private messaging between friends
- Broadcast messages to all online friends
- Customizable settings per player
- Offline player name display
- Console logging for moderation
- MySQL support with connection pooling
- JSON fallback for simplicity
- Plugin Messaging API for custom integrations
- Automatic username caching
- Interactive settings menu
- Configurable notifications (join/leave/server switch)
- Flexible message customization with auto-disable for empty entries
PlaceholderAPI Support (New!):
Use the included companion plugin to display friend data in scoreboards, holograms, chat, and more:
Available Placeholders:
- %friends_online% # Number of online friends
- %friends_total% # Total number of friends
- %friends_offline% # Number of offline friends
- %friends_online_list% # Comma-separated online friends
- %friends_online_servers% # Unique servers count
To find the companion plugin for Spigot/Paper servers, simply click on a version of the plugin (click on ‘Version’ and then, for example, ‘1.4.1-SNAPSHOT-3’), and under ‘Files’ you’ll find both the plugin and the companion plugin available for download.
Supported Velocity Version:
Velocity 3.3.0 and higher (Java 17+)
Important when setting up:
- Choose your storage type in
config.yml (json or mysql)
- If using MySQL, configure database credentials
- Restart the proxy server
- Optionally integrate with Spigot/Paper plugins using the Plugin Messaging API
Just send me a message on Discord if you have any questions, suggestions, or requests for new plugins.
评论 0
登录后参与评分
还没有评论,来抢沙发吧