How can I query the Minecraft Vanilla version?

Ph
2

Player player;

if CraftPlayer) player) .getHandle (). PlayerConnection.networkManager.getVersion ()> = 47) {
// 1.8
}

.getVersion () is marked in red:

"The method getVersion () is undefined for the type NetworkManager"

In

For what

Ph

Just want to know if the player with 1.8 joint.
or so