Check player version?

Discussion in 'Plugin Help/Development/Requests' started by jusjus112, Jan 14, 2015.

Thread Status:
Not open for further replies.
  1. Offline

    jusjus112

    hey guys,

    I dont know, if i can ask it here, but is there an way to check the player his version?
    Like, if they connect with 1.7, im putting him in an arraylist. And if the player is in
    1.8 they go in a hashmap?
     
  2. Offline

    nverdier

    @jusjus112 I'm going to assume you're using Spigot since it seems both 1.7 and 1.8 players can join your server. In that case, you would use
    Code:
    ((CraftPlayer) player).getHandle().playerConnection.networkManager.getVersion();
    If it returns 47, then it means that the player is using 1.8.
     
    jusjus112 likes this.
Thread Status:
Not open for further replies.

Share This Page