KaiKikuchi / ServerRedirect

Forge/Fabric mod providing a way for Minecraft servers to transfer players to another server address, without the use of a proxy server.
MIT License
27 stars 9 forks source link

Add a way to see if a client has the mod serverside #12

Closed ghost closed 2 years ago

ghost commented 2 years ago

Trying to use this as a replacement for bunge, and I want to give the client an error message if they don't have this mod installed.

Could you add a packet to ping the client and see if they have the mod or not?

KaiKikuchi commented 2 years ago

Hey, thanks for the suggestion. This was already included in version prior 1.4. As I rewrote the mod completely in v.1.4, I removed this feature. I will try to add it back soon.

ghost commented 2 years ago

awsome!

KaiKikuchi commented 2 years ago

Added IfPlayerCanRedirect and IfPlayerCannotRedirect commands in version 1.4.3

For command usage, please check: https://www.curseforge.com/minecraft/bukkit-plugins/server-redirect

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!

ghost commented 2 years ago

Awesome thanks!

ghost commented 2 years ago

Does this work on forge too?

I am running the server mod on forge 1.16.5

KaiKikuchi commented 2 years ago

Yes, this feature is available for all server versions of ServerRedirect.