SmartRouter
SmartRouter 是一个 Velocity 插件,它会根据玩家上次连接的服务器智能地为其路由。该插件专为拥有多个子服务器的网络设计,例如 hub、spawn 和 smp。
✨ 功能
- 将尝试连接到回退服务器(如
spawn)的玩家重定向到他们的上一台服务器。
- 跟踪玩家上次连接的服务器,并在重新连接时记住该信息。
- 可通过
config.yml 完全自定义配置。
- 需要 LuckPerms 来存储和检索玩家元数据。
? 依赖项
- Velocity 代理
- LuckPerms(必须在代理上安装并启用)
如果未找到 LuckPerms,该插件将自动禁用自身。
⚙️ 配置
配置文件位于 plugins/smartrouter/config.yml。
file-version: 1
intercept-servers:
- spawn
remember-servers:
- spawn
- smp
intercept-servers
当玩家连接时要拦截的服务器名称列表。
如果玩家尝试加入这些服务器中的任何一个,SmartRouter 会检查其最后已知的服务器,并在必要时将其重定向。
示例:
如果玩家尝试加入 spawn,但他们最后已知的服务器是 smp,他们将被重定向回 smp,而不是加入 spawn。
remember-servers
作为玩家最后连接的服务器而被记住的服务器名称列表。
当玩家加入这些服务器中的任何一个时,SmartRouter 会将服务器名称保存到元数据中(通过 LuckPerms)。
提示:
在此处添加玩家重新连接后可能会返回的任何服务器。
? 使用示例
假设你的网络包含:
- 玩家首次连接时始终进入的中心枢纽服务器。
- 玩家初始传送到的出生点区域。
- 玩家探索并可返回的 SMP 世界。
使用 SmartRouter,玩家第一次连接时会被路由到出生点。如果他们在 smp 中下线,下次连接时,SmartRouter 将跳过出生点并将他们直接送回 smp。
SmartRouter
SmartRouter is a Velocity plugin that smartly routes players based on their last connected server. It is designed for networks with multiple sub-servers like hub, spawn, and smp.
✨ Features
- Redirect players trying to connect to a fallback server (e.g.,
spawn) to their previous server.
- Track players' last connected server and remember it across reconnects.
- Fully configurable with
config.yml.
- Requires LuckPerms to store and retrieve player metadata.
? Requirements
- Velocity Proxy
- LuckPerms (must be installed and active on the proxy)
If LuckPerms is not found, the plugin will automatically disable itself.
⚙️ Configuration
The configuration file is created at plugins/smartrouter/config.yml.
file-version: 1
intercept-servers:
- spawn
remember-servers:
- spawn
- smp
intercept-servers
A list of server names to intercept when a player connects.
If a player attempts to join any of these servers, SmartRouter checks their last known server and redirects them if needed.
Example:
If a player tries to join spawn, but their last known server was smp, they’ll be redirected back to smp instead of joining spawn.
remember-servers
A list of server names to remember as a player's last server.
When a player joins any of these servers, SmartRouter saves the server name to metadata (via LuckPerms).
Tip:
Add any servers here that players might return to after a reconnect.
? Example Use Case
Let’s say your network has:
- A hub server players always connect to first.
- A spawn area where players are teleported initially.
- An SMP world players explore and return to.
With SmartRouter, players are routed to spawn the first time. If they log out in smp, the next time they connect, SmartRouter will skip spawn and send them back to smp.
评论 0
登录后参与评分
还没有评论,来抢沙发吧