Class LifestealerHeartDropRestrictionManager

java.lang.Object
dev.chicoferreira.lifestealer.restriction.LifestealerHeartDropRestrictionManager

public class LifestealerHeartDropRestrictionManager extends Object
Manages the restrictions on the heart drop that should be applied when a player dies.
  • Constructor Details

  • Method Details

    • evaluateHeartDropAction

      @NotNull public @NotNull LifestealerHeartDropAction evaluateHeartDropAction(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull LifestealerUser user, @NotNull @NotNull org.bukkit.event.entity.PlayerDeathEvent event)
      Evaluates the action to take when a player dies (drop the heart item or not and remove hearts from the player or not).
      Parameters:
      player - the player to test
      user - the user related to the player
      event - the event to test
      Returns:
      the action to take
    • setActions

      public void setActions(List<LifestealerHeartDropRestrictionAction> actions)
      Sets a new list of restriction actions. Used when the configuration is reloaded.
      Parameters:
      actions - the new actions list