I wanted to ask how you can find out which version the player is playing with (e.g. 1.8.8).
You can find out via the protocol version (47 is e.g. 1.8 - 1.8.9).
I would have to look again how exactly that works.
If you have ViaVersion on it you can also check it with a command: / viaver list
I think that's what you're looking for:
ProtocolLibrary.getProtocolManager () getProtocolVersion (Player).
((CraftPlayer) player) .getHandle (). PlayerConnection.networkManager.getVersion ();
http://wiki.vg/Protocol_version_numbers
I would choose the first option. You have to use ProtocolLib for this