MC Version

Discussion in 'Plugin Development' started by 97WaterPolo, Sep 17, 2014.

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


    How would one get the version of MC a player is using? 1.7.2 vs 1.7.9, etc.
  2. Offline


    for what reason?
  3. Offline


  4. teej107 He wants the version of the client, not the server. That's not something you'll find in the JavaDocs.
  5. With craftbukkit, there isn't a way to get this version, this is because the client only send its protocol version it is using inside the first packet it sends. Craftbukkit uses the mine craft source and kicks users with other protocol versions than craftbukkit was build for.
  6. Offline


    You can get the protocol version, you can find the protocol version -> client version here. You can get the version by using the following code:
    1. ((CraftPlayer)player).getHandle().playerConnection.networkManager.getVersion()

    Hope this helps :)
  7. Offline


    Sadly enough not in CraftBukkit :p
  8. Offline


  9. Offline


    97WaterPolo CraftBukkit doesn't store the version from the packet, CakePvP is using a 3rd party build. If you meant the protocol AttributeKey, that stores which protocol you are on (STATUS, LOGIN, PLAY, etc)
    rbrick likes this.
Thread Status:
Not open for further replies.

Share This Page