Solved Checking player state

Discussion in 'Spigot Plugin Development' started by MadMaxCookie, May 25, 2016.

  1. hello how do I check if the player is alex or steve ?

    Edit : is there any possible way ?
    • Creative Creative x 1
  2. MiniDigger


    I can't see how this could be usefull but I guess you can get the gameprofile of the player and check his skindata
  3. You could run a little java code to receive data from a skindata site or something like that, then check it against 2 skins pre placed in your server or jar files.
    For example downloading it from "" in another example or more setup example "" which you would just switch out %player% with the player name and it should work.
  4. for me I'll use it to an void

    Code (Java):
    void setGender(Player player, String gender) {
      getConfig().set(player.getName() + ".gender", gender);
  5. MiniDigger


    All the info you need to found on (
    you can get a gameprofile directly from the session server (eg.
    Code (Text):
    the info you need is on the value attribute of the texture object. It is a base64 string. that decodes to:
    Code (Text):
    if the player has a slim, alex style skin, there will be a "metadata": {"model": "slim"} tag under SKIN
    • Informative Informative x 1
  6. Thanks I'll start the coding.