First Join

Discussion in 'Plugin Development' started by stamline, Apr 27, 2014.

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


    How can I check if the player joined for the first time in "PlayerJoinEvent"?
  2. if(event.getPlayer().hasPlayedBefore()) {

    returns false if it is their first time.
  3. Offline


    oh.... Thanks
  4. Hehe, no problem. Anyone could have made that mistake. Happy coding :D
  5. Offline


    There's supposed to be a ! :p
    1. if(!event.getPlayer().hasPlayedBefore()) {
    2. // code
  6. Either way, if you put an !, it'll return true if they've never played before. If you don't it'll return false. You've just reversed the outcome. (So we're technically both correct)
  7. Offline


Thread Status:
Not open for further replies.

Share This Page