Closed irrelevantknight closed 11 years ago
That will be because they do not have a lasting effect, this hook is called only for potions that have a duration.
Irrelevant claimed that they DO have a lasting effect though, but that it is set to one tick?
It is called instant.... The method called for these will be different. It will just require us to add a hook call at the right spot.
It's called instant for a reason ;) For instance: Splash invisibility potion. It's a splash poition but actually applies a lasting effect on the entity. Insta damage or insta heal do not. They do their thing once and are not added the the effects list of an entity.
Ah, guess he was wrong then :-)
Regular (non splash) potions of instant health and damage do call the hook though. Also, according to the Minecraft wiki, the potions can even be made to last more than one tick, and will heal the player once per tick. http://www.minecraftwiki.net/wiki/Status_effect
The method to apply the potion effect is STILL not called on the server. Please feel free to test it yourself ;) As @somners said. We need to find a different place as it's not the same thing.
I tested by making a listener with "onPotionApplied(PotionEffectAppliedHook hook){plugin.getLogman().logInfo("blah");}". All potions and splash potions seem to call the hook, except for splash potions of instant health (1 and 2), and splash potions of instant damage (1 and 2).