Add a "Send Player to Server (IP)" Syntax for Skript
RyuguDev opened this issue ยท 2 comments
Suggestion
Add a syntax to allow sending players to a different server using their IP address.
Detailed Description:
Create a new expression or effect in Skript that allows server administrators to transfer players to another server by specifying the server's IP and port. The syntax could look like:
send player %player% to server with ip %string% and port %number%
This would make it possible for Skript users to easily route players to different servers without needing complex external plugins.
Example Usage:
command /switchserver:
trigger:
send player to server with ip "192.168.1.1" and port 25565
Why?
Many Minecraft networks consist of multiple servers, and being able to transfer players between these servers from within Skript adds flexibility. This feature will simplify the process of server migration or segmentation of player traffic.
Currently, such functionality requires separate plugins or proxy systems like BungeeCord, but incorporating it into Skript would centralize functionality and make it accessible to a broader range of server admins without the need for third-party tools.
This would seamlessly transfer the player to the server at the specified IP address.
Other
It would be helpful if this feature could work in conjunction with common proxy systems like BungeeCord or Velocity to ensure smooth integration with large server networks. Additionally, security measures should be considered to avoid misuse (e.g., rate-limiting the command or adding verification checks).
Agreement
- I have read the guidelines above and affirm I am following them with this suggestion.
Spigot has some methods to achieve this in 1.20.5+ I think. The method to transfer is Player#transfer(String, int)
, and there is another method to check if a player has been transferred. There are also new "cookie" methods to store and retrieve info on the player's client, which can be used between server transfers. Seems like the kind of thing Skript could add fairly easily, but for the time being if you have skript-reflect then you can use those methods.