PlayerLogin or PlayerJoin event?

Discussion in 'Plugin Development' started by WolfMage1, Jan 1, 2016.

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

    WolfMage1

    Hello, I think its been a year since created a thread but something that was bothering me, which is better to use? the playerlogin event or playerjoin? and what's the difference between the 2?) what can you do in playerjoin that you cant do in playerlogin (except changing login messages)
     
  2. Offline

    Zombie_Striker

  3. Offline

    elian1203

    PlayerLoginEvent is usually used to allow/deny people to join the server. PlayerJoinEvent is for just about anything else.
     
  4. Offline

    WolfMage1

  5. Offline

    elian1203

    Kick them if you don't want them in there for some reason and set the reason they were kicked for. Other than that you can allow them in if they were denied, such as being banned or server is full.
     
  6. Offline

    BlueCraftMC

    if you wanna use PlayerJoinEvent, you can send them a message or just use setJoinMessage(), or you can give them items, or set them on fire. Its just like if the player touches a ground, it'll do something. PlayerLoginEvent, well I've never used it but like @Zombie_Striker said it triggers before joins in the server, maybe send console a message that someone is trying to connect to the server or something. Hope this helps.
     
Thread Status:
Not open for further replies.

Share This Page