Water Bottle Fire Extinguish Event?

Discussion in 'Spigot Plugin Development' started by CompleteNoob, Apr 29, 2017.

  1. I'm sorry if this is a duplicate of a question asked somewhere else I've tried searching and can't see anything which directly answers my question.

    I'm currently trying to manage when water bottles are thrown on fire whether or not the fire is extinguished. (A feature added in 1.9) I can't see an event which is correctly fired when the water bottles are thrown for me to actually manage this.

    I've tried LingeringPotionSplashEvent and PotionSplashEvent, but neither seem to be triggered then.

    What event is triggered when a water bottle extinguishes fire? Is there one?
  2. sothatsit


    Have you registered your events? PotionSplashEvent sounds like it should be called.
  3. Yes, I'm sure I've registered the events, thanks for trying to help though. If you watch this video: https://streamable.com/lieen you can see how the fire resistance potion triggers the event but the water doesn't.

    Any ideas?
    #3 CompleteNoob, Apr 29, 2017
    Last edited: Apr 29, 2017
  4. sothatsit


    You would be surprised how many times the issue is just that someone has forgotten to register their events, always worth checking :)

    I've taken a look into the source code for the server when it throws a PotionSplashEvent. The reason it does not call one for when the water bottle hits is that it cannot find a potion type for the water bottle, which makes sense. A ProjectileHitEvent should be thrown however.