Class GiveExpAction
java.lang.Object
io.github.lucfr1746.llibrary.action.Action
io.github.lucfr1746.llibrary.action.list.GiveExpAction
Represents an action that gives experience points to a player.
-
Constructor Summary
ConstructorsConstructorDescriptionGiveExpAction
(int amount) Constructs a GiveExpAction with the specified amount of experience points. -
Method Summary
-
Constructor Details
-
GiveExpAction
public GiveExpAction(int amount) Constructs a GiveExpAction with the specified amount of experience points.- Parameters:
amount
- The amount of experience to give.- Throws:
IllegalArgumentException
- if the amount is negative.
-
-
Method Details
-
getAmount
public int getAmount()Gets the amount of experience to be given.- Returns:
- The experience amount.
-
execute
public void execute(org.bukkit.entity.Player target) Executes the action, giving experience points to the target player.
-