Hello, I need to make a command that test if the client has optifine installed if not disconnect them with a message saying its not installed. My server requires people have optifine because I noticed the big server boost on ticks with optifine installed on client. Less stress on the server loading the chunks.
Is there anyway I can do this with a command block? I looked for a mod that will do this but to no luck. And please dont give me a command that breaks the server temporary...
Running on minecraft: 1.16.4
The server can only detect a mod if the mod sends something to the server.
Optifine mod, to my knowledge, does not send anything to the server. So you can't detect it.
Moreover, by saying Optifine boosting the server tick isn't a valid argument as well, due to what I said above.
There can be other causes (they might not, but I'm just speculating) that yield the performance difference, such as the player not installing Optifine holding a lot of shulker boxes, them making lag machines in their house and loading it, or the guy did something such that he's targeted by many command blocks or plugins on the server-side.
If you're using the same device to host the server AND the client (e.g. Starting your Minecraft server on your PC, while playing Minecraft on it), more players can mean more lag as well.
Unless there exists a mod to send the client's mod list to the server, there's rlly no way to tell if they install certain mods. Some mods like killaura and bhopping are easy to detect because they literally tell the server to move the player in an abnormal pattern.
tl;dr Not possible.
Hope you can accept this answer after 3 days of waiting.