Interface EssenceConsumptionCallback

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 EssenceConsumptionCallback
Represents a callback to be executed when a player consumes a vial of entity essence in the world.
Author:
Parker Hawke - Choco
  • Method Summary

    Modifier and Type Method Description
    void consume​(@NotNull org.bukkit.entity.Player player, @NotNull EntityEssenceData essenceData, @NotNull org.bukkit.inventory.ItemStack item, int amountOfEssence, float potency)
    Called when a player consumes a vial of entity essence in the world.
  • Method Details

    • consume

      void consume​(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull EntityEssenceData essenceData, @NotNull @NotNull org.bukkit.inventory.ItemStack item, int amountOfEssence, float potency)
      Called when a player consumes a vial of entity essence in the world.
      Parameters:
      player - the player that consumed the vial
      essenceData - the essence data of the vial
      item - the item stack in the inventory
      amountOfEssence - the amount of essence in the vial
      potency - the potency of essence relative to max essence (0.0 - 1.0 where 0.0 is no essence and 1.0 is maximum essence)