
Minecraft 服务端插件
Server Redirect
This mod provides a lightweight way for servers to transfer players to another server address, without the use of a proxy server.
- 版本范围
- 1.7.10–1.21
- 下载量
- 67.0 万
插件介绍
Server Redirect
This mod provides a lightweight way for servers to transfer players to another server address, without the use of a proxy server.
Server Redirect supports Forge, Fabric, Bukkit/Spigot, SpongeVanilla/SpongeForge, Bungeecord/Waterfall and Velocity.
With Server Redirect, server admins can avoid mod incompatibility issues caused by proxy servers (Bungeecord, Waterfall, and Velocity). In particular, this mod can be used in combination with Waterfall and Forge 1.13+ servers and clients to provide a way to transfer players between servers (currently, the 1.13+ Forge server needs to be "online" as they haven't included IP forwarding yet...).
This mod is optional, so it can be added to modpacks and players can still join servers without this mod. Likewise, servers with this mod can be joined by clients without this mod.
Commands
- /redirect <Target> <Server Address>: redirects the specified target player(s) to the specified address
- /fallback <Target> <Server Address>: sets the fallback server address for the specified target player(s)
- /ifplayercanredirect <Target> <Command...>: runs the specified command for each of the target player(s) that have Server Redirect
- /ifplayercannotredirect <Target> <Command...>: runs the specified command for each of the target player(s) that have not Server Redirect
The command source can be anything that can run a command, like a command block, a player, or console. Replace /redirect with /fallback to have the specified target players connect to the specified server address when they get forcefully disconnected from the server.
The <Target> argument can be one of the following:
- Player Name/UUID: the specified player on the server
- Target Selector: a target selector. Target selectors are not available on Bungeecord and Velocity.
- r=N: all players within N blocks from the command sender, or from the overworld spawn if run by console. Plugin version only.
- s=<ServerName>: all players in the specified ServerName. Bungeecord and Velocity only.
- *: all players on the server.
The <Command...> argument can contain the following placeholders:
- %PlayerName: this placeholder will be replaced with the player's name
- %PlayerId: this placeholder will be replaced with the player's UUID
NOTICE: /ifplayercanredirect and /ifplayercannotredirect will likely not work as expected if run when the target player just joined the server. These commands rely on the client sending a packet to the server telling them they have this mod installed. This packet requires some time to be sent by the client and processed by the server. It is recommended to delay this command execution by at least 20 ticks after the player has joined the server!
Examples:
- /redirect KaiNoMood myawesomemcserver.net:25667: the player named KaiNoMood will connect to myawesomemcserver.net:25667
- /redirect a54a7884-9ea4-4d54-ac35-1623d70ffbe1 myawesomemcserver.net:25667: the player with the specified UUID will connect to myawesomemcserver.net:25667
- /redirect * myawesomemcserver.net:25667: all players on the server will connect to myawesomemcserver.net:25667.
- /redirect @a[m=creative] myawesomemcserver.net:25667: all players in creative mode will connect to myawesomemcserver.net:25667.
- /redirect r=10 myawesomemcserver.net:25667: all players within 6 blocks from the command sender will connect to myawesomemcserver.net:25667. This works on Bukkit and Sponge based servers only.
- /redirect s=lobby myawesomemcserver.net:25667: all players in the "lobby" server will connect to myawesomemcserver.net:25667. This works on Bungeecord and Velocity proxy servers only.
- /ifplayercanredirect * say %PlayerName is online and using Server Redirect! Yay!: the specified command will run for each player on the server that has Server Redirect.
- /ifplayercannotredirect @a[distance=..5] tell %PlayerName It does not seem you have Server Redirect installed! Make sure to install it!: the specified command will run for all players without Server Redirect within 5 blocks of the command source.
Replace /redirect with /fallback for setting a fallback address for the target players. For more info about the fallback command, read below.
FAQ
How this mod redirects players
- By running the /redirect command, the server will send a "transfer" packet containing the specified server address to the specified players.
- All players receiving the packet that have the ServerRedirect mod installed will disconnect from the server, and automatically direct connect to the specified server address.
Any server address that is reachable by the players with the "Direct Connect" button can be used.
The "transfer" packet will not affect players without the mod installed: they will simply stay connected on the current server.
This behaves like the transfer packet present in "Minecraft: Bedrock Edition", feature included by Mojang by default on that client. Regrettably, "Minecraft: Java Edition" is missing this feature entirely.
Both the redirect and fallback commands are not supposed to be run by players. They are intended for being run by the console, command blocks and other plugins. Command aliases and "server selector" GUIs are recommended (see BossShop or VirtualChest).
What the fallback command is for
The fallback command tells the clients which server address they should connect to in case they get forcefully disconnected from the server (e.g. the server crashes).
Server admins want to use this by running the fallback command automatically by the server for every player that joins the server. If the server shuts down for any reason, the players will automatically direct connect to the fallback server address specified in the fallback command.
Another use of the fallback feature is when you want to redirect a player to a server, but they might get rejected for some reason (e.g. the server is offline). First, set the fallback address for the player to a server address you can be sure they can reach, then use the redirect command to redirect the player to the server address they might get rejected from. If the player cannot join the server they were redirected to, they'll automatically join the fallback server.
Reasons for using this mod instead of a proxy like Bungeecord, Waterfall or Velocity
Forge mods don't always expect that the player is being moved from one server to another, and when a proxy transfers a player to a different server, it can cause glitches or crashes. Forge mods commonly expect to be disconnected from the server before connecting to another one. Additionally, Forge 1.13+ does not support proxies server switching. This mod solves the issue by properly disconnecting players from the server, and then connecting them to another server. This way, mods can properly handle players switching from a server to another.
Server admins can also use a combination of a proxy and Server Redirect if they want to use all the other features proxies can provide (except on Forge 1.13+ servers currently). Still, it is suggested to look into replacing the proxy with cross-server plugins and mods.
Players with this mod can join servers without this mod
Any combination of presence/absence of this mod will let players connect to servers. Players with this mod can connect to Vanilla servers as well, and players with vanilla Minecraft can also connect to servers with this mod.
This mod can be added in modpacks
Feel free to add this modpack in public and private modpacks. Asking for permission is not required. If you add Server Redirect to your public modpack, feel free to let everyone know in the comments below! Although this mod shouldn't have any conflict with any other mod, feel free to report conflicts here.
License and improvements to the project
This project is MIT licensed. Feel free to fork this project and/or suggest new features on the Issues page! If you cannot find the right version of Server Redirect for your Minecraft version, feel free to ask there!
If you wish to buy me a pizza, click here! I appreciate it very much! :)
版本与下载
推荐下载
ServerRedirect-FabricMC20r2-1.4.5.jar版本 1.4.5 · 19 KBSHA-1 598203c8201ae5bdcd72968f5642619eff062d6c下载 ServerRedirect-FabricMC20r2-1.4.5.jar1.4.5
正式版- 加载器
- fabric
- MC 版本
- 1.20.4
SHA-1 598203c8201ae5bdcd72968f5642619eff062d6c获取文件 ServerRedirect-FabricMC20r2-1.4.5.jar1.4.5
正式版- 加载器
- forge
- MC 版本
- 1.21
SHA-1 355ea2c31b3225cf8b9bdb99eccbd731edd2a7c2获取文件 ServerRedirect-ForgeMC21-1.4.5.jar1.4.5
正式版- 加载器
- fabric
- MC 版本
- 1.21
SHA-1 705cc1a2b59cb18d6371887df1823898e58eaaba获取文件 ServerRedirect-FabricMC21-1.4.5.jar1.4.5
正式版- 加载器
- fabric
- MC 版本
- 1.20 · 1.20.1 · 1.20.2
SHA-1 6bb0e840a75ecc2ee2b06b8a8ca36edf68006e86获取文件 ServerRedirect-FabricMC20-1.4.5.jar1.4.5
正式版- 加载器
- fabric
- MC 版本
- 1.19 · 1.19.1 · 1.19.2 · 1.19.3 · 1.19.4
SHA-1 005bc76309a1bd688f8f3b1812bae9aa98b90f2d获取文件 ServerRedirect-FabricMC19-1.4.5.jar1.4.5
正式版- 加载器
- fabric
- MC 版本
- 1.18 · 1.18.1 · 1.18.2
SHA-1 e57e6b9a83eb250507ca0c76fadd9995b1ae48da获取文件 ServerRedirect-FabricMC18-1.4.5.jar1.4.5
正式版- 加载器
- fabric
- MC 版本
- 1.17 · 1.17.1
SHA-1 d2296b0cb6b4b0ba6ff4c933359bd66e0319d7e2获取文件 ServerRedirect-FabricMC17-1.4.5.jar1.4.5
正式版- 加载器
- fabric
- MC 版本
- 1.16 · 1.16.1 · 1.16.2 · 1.16.3 · 1.16.4 · 1.16.5
SHA-1 7fd75d71fbd18dca64e503a1c1b3295413df92d4获取文件 ServerRedirect-FabricMC16-1.4.5.jar1.4.5
正式版- 加载器
- forge
- MC 版本
- 1.20.2
SHA-1 1c17bfc173b6a0aa9adc6d2ad9b4816a7ccdd80f获取文件 ServerRedirect-ForgeMC20r2-1.4.5.jar1.4.5
正式版- 加载器
- forge
- MC 版本
- 1.20 · 1.20.1
SHA-1 968f96b4c1c841901167011fc37fc63aee1706f4获取文件 ServerRedirect-ForgeMC20-1.4.5.jar1.4.5
正式版- 加载器
- forge
- MC 版本
- 1.19 · 1.19.1 · 1.19.2 · 1.19.3 · 1.19.4
SHA-1 30ce6ec9551d5bb7b28d374e8b2ded0ee47469c5获取文件 ServerRedirect-ForgeMC19-1.4.5a.jar1.4.5
正式版- 加载器
- forge
- MC 版本
- 1.18.1 · 1.18.2
SHA-1 718787558cb41bc6235026a3d68803c456848410获取文件 ServerRedirect-ForgeMC18-1.4.5.jar1.4.5
正式版- 加载器
- forge
- MC 版本
- 1.16.5
SHA-1 89e31fc3db98b3ae601aed44431a69902d0f7e71获取文件 ServerRedirect-ForgeMC16-1.4.5.jar1.4.5
正式版- 加载器
- forge
- MC 版本
- 1.12.2
SHA-1 6950d75635551ecf4c95e05acc1fd378ea23cb3a获取文件 ServerRedirect-ForgeMC12-1.4.5.jar1.4.5
正式版- 加载器
- forge
- MC 版本
- 1.10.2
SHA-1 898437d527215357a3e78baec8331f5601854992获取文件 ServerRedirect-ForgeMC10-1.4.5.jar1.4.5
正式版- 加载器
- forge
- MC 版本
- 1.8.9
SHA-1 e2b405ab9a16bd833dfb0b7284ee08727f203467获取文件 ServerRedirect-ForgeMC8-1.4.5.jar1.4.5
正式版- 加载器
- forge
- MC 版本
- 1.7.10
SHA-1 66e55a27b66d91a071dc3aeb8e0d06a3b939d6d5获取文件 ServerRedirect-ForgeMC7-1.4.5.jar1.4.3
正式版- 加载器
- bukkit · bungeecord · spigot · sponge · velocity · waterfall
- MC 版本
- 1.8.9 · 1.9.4 · 1.10.2 · 1.12.2 · 1.16.5 · 1.17.1 · 1.18.2 · 1.19.4 · 1.20.2 · 1.20.6 · 1.21
SHA-1 7e67ed0ca7abc862ac71d55b9f886d841ec56612获取文件 ServerRedirect-Plugin-1.4.3.jar1.16.5-1.4.4
正式版- 加载器
- fabric
- MC 版本
- 1.16.5
SHA-1 c33eec2d65b4781b9ae8f8fc61cd83c686cb817f获取文件 ServerRedirect-FabricMC16-1.4.4.jar1.17.1-1.4.4
正式版- 加载器
- fabric
- MC 版本
- 1.17.1
SHA-1 49ae9890a612ac82d9d33a35138dc391ee1147f9获取文件 ServerRedirect-FabricMC17-1.4.4.jar1.18.2-1.4.4
正式版- 加载器
- fabric
- MC 版本
- 1.18.2
SHA-1 85b3830f3d5d038eed5d5e5f746a3ac3e44fc9ec获取文件 ServerRedirect-FabricMC18-1.4.4.jar1.19-1.4.4
正式版- 加载器
- fabric
- MC 版本
- 1.19
SHA-1 ad23f3ce9e4ea176002db7a19e59d2efb5a872be获取文件 ServerRedirect-FabricMC19-1.4.4.jar