As I said before, nothing you get from the client is safe. It’s easy to create a forgemod and hide it from the server by simply excluding it from the packets that give that information. So no, you can’t really trust that.
thats bad…
what about getting information about the files and folders located in .minecraft-Folder?
Impossible, like already stated before. Everything the player sends need to be threaded with cautiousness. Like if you would include a mod in your modpack, that makes players send their folder information. Hackers can simply change that mod to not send the information or send information that the server wants to have.
Although their has to be said that it possible will be easier to block people on a moded server. Because your absolutely sure that they are using forge. And forge sends modlists for checking if the client can join the server or not. You could make it that it blocks mods or simply say that changing the pack isn’t allowed. It will not stop the hackers from getting in, but some kids that try to install xray trough forge may be caught that way.
Also at this point, I haven’t seen mods/plugins that do this. (Not that I will waste my time on this xD)
As with other game’s servers that do this server side, you’d need a relatively complex lag compensation for that to work very well, otherwise you’d get a lot of lag teleporting around when players move on the server.