1.16.x How to get version of player

Discussion in 'Spigot Plugin Development' started by Poofyjerry, Sep 16, 2020 at 7:02 PM.

  1. I am not using Bungee cord. But I am using multiple worlds and I am also using via version and via backwards to allow players from 1.13 - 1.16 to join. I want to let people from 1.13 - 1.16 join the kitpvp but I don't want to let them join my survival world because the world is in 1.16 so I only want 1.16 players joining the survival world so that via version doesn't have to try to make the entire 1.16 world work for someone in 1.13.

    This is what I tried but I get an error saying the method isnt defined.
  2. Choco


    Doesn't matter. Anything you get from the server to get a player's version will always be that of the server. Use ViaVersion's API.
    Code (Java):
    Protocol versions can be found on wiki.vg
    • Like Like x 1
  3. Would I have to build bath of my plugin to the Via Versions jar to use their API? I have never used another plugins methods like that