2 Questions Out Of Curiousity

Discussion in 'Spigot Plugin Development' started by TheShermanTanker, May 3, 2017.

  1. 1. If i do entity.setHealth() will the EntityDamageEvent trigger?
    2. What happens if you cancel the PlayerJoinEvent/PlayerLoginEvent?
     
    1. No, it shouldn't. I'm working on a custom health system at the moment and I have not had any damage events triggered for changing the health value.
    2. The player will be kicked. I think you have to specify a message though for it to take effect. Atleast in BungeeCord.
     
  2. If you took the time to read the Javadocs, you'd see that the PlayerQuitEvent does not implement Cancellable.
     
  3. Yeah I never really stop to learn the methods and stuff, my bad


    EDIT: Wait I said PlayerJoinEvent not PlayerQuitEvent
     
  4. Haha sorry! I thought it said PlayerJoinEvent/PlayerQuitEvent, apologies.