Class LifestealerHeartDropRestrictionManager
java.lang.Object
dev.chicoferreira.lifestealer.restriction.LifestealerHeartDropRestrictionManager
Manages the restrictions on the heart drop that should be applied when a player dies.
-
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescription@NotNull LifestealerHeartDropAction
evaluateHeartDropAction
(@NotNull org.bukkit.entity.Player player, @NotNull LifestealerUser user, @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).void
Sets a new list of restriction actions.
-
Constructor Details
-
LifestealerHeartDropRestrictionManager
-
-
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 testuser
- the user related to the playerevent
- the event to test- Returns:
- the action to take
-
setActions
Sets a new list of restriction actions. Used when the configuration is reloaded.- Parameters:
actions
- the new actions list
-