Class TakeExpAction
java.lang.Object
io.github.lucfr1746.llibrary.action.Action
io.github.lucfr1746.llibrary.action.list.TakeExpAction
Represents an action that removes experience points from a player.
-
Constructor Summary
ConstructorsConstructorDescriptionTakeExpAction
(int amount) Constructs a TakeExpAction with a specified amount of experience to remove. -
Method Summary
-
Constructor Details
-
TakeExpAction
public TakeExpAction(int amount) Constructs a TakeExpAction with a specified amount of experience to remove.- Parameters:
amount
- The amount of experience to remove.- Throws:
IllegalArgumentException
- If the amount is negative.
-
-
Method Details
-
getAmount
public int getAmount()Gets the amount of experience to be removed.- Returns:
- The experience amount.
-
execute
public void execute(org.bukkit.entity.Player target) Executes the action, deducting experience points from the target player. The experience cannot go below zero.
-