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.

@FunctionalInterface public interface FluidEffect
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 Type
    Method
    Description
    default void
    leave(@NotNull org.bukkit.entity.Entity entity, @NotNull FluidType fluid)
    Called once when the entity leaves the fluid (or the fluid goes away).
    void
    tick(@NotNull org.bukkit.entity.Entity entity, @NotNull FluidType fluid, int ticksInside)
    Called every 10 ticks while entity is inside fluid.
  • Method Details

    • tick

      void tick(@NotNull @NotNull org.bukkit.entity.Entity entity, @NotNull @NotNull FluidType fluid, int ticksInside)
      Called every 10 ticks while entity is inside fluid.
      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).