Solved Choosing correct Event

Discussion in 'Plugin Development' started by L33m4n123, Apr 16, 2013.

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

    L33m4n123

    Hey guys!

    In my Plugin I want that a player does not lose health when he is underwater.. It works perfectly if I use the PlayerMoveEvent (while the player is moving obviously)

    Is there a Event that is triggered while a Player does nothing and is AFK? Because I want that the event is also triggered while they are just standing still in the water. Thanks in advance
     
  2. Offline

    Spikes

    I would use EntityDamageEvent and check if the cause is DamageCause.DROWNING then cancel the event and set the breath to maximum :3
     
    L33m4n123 likes this.
  3. Offline

    L33m4n123

    Perfect Idea, Thanks :)

    Works perfectly fine :)
     
  4. Offline

    Spikes

    No problem dude ;)
     
Thread Status:
Not open for further replies.

Share This Page