Interface FluidEffect
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
What a placed fluid does to an entity inside it (potion, damage, fire …). Made by a
FluidEffectType from a definition, or written in code. Runs on the entity's thread.-
Method Summary
Modifier and TypeMethodDescriptiondefault voidCalled once when the entity leaves the fluid (or the fluid goes away).voidCalled every 10 ticks whileentityis insidefluid.
-
Method Details
-
tick
void tick(@NotNull @NotNull org.bukkit.entity.Entity entity, @NotNull @NotNull FluidType fluid, int ticksInside) Called every 10 ticks whileentityis insidefluid.- Parameters:
ticksInside- how long the entity has been inside, in ticks
-
leave
default void leave(@NotNull @NotNull org.bukkit.entity.Entity entity, @NotNull @NotNull FluidType fluid) Called once when the entity leaves the fluid (or the fluid goes away).
-