Class GiveMoneyAction
java.lang.Object
io.github.lucfr1746.llibrary.action.Action
io.github.lucfr1746.llibrary.action.list.GiveMoneyAction
Represents an action that gives money to a player using an economy system.
-
Constructor Summary
ConstructorsConstructorDescriptionGiveMoneyAction
(Double amount) Constructs a GiveMoneyAction with the specified amount of money. -
Method Summary
-
Constructor Details
-
GiveMoneyAction
Constructs a GiveMoneyAction with the specified amount of money.- Parameters:
amount
- The amount of money to give.- Throws:
IllegalArgumentException
- if the amount is negative.
-
-
Method Details
-
getAmount
Gets the amount of money to be given.- Returns:
- The amount of money.
-
execute
public void execute(org.bukkit.entity.Player target) Executes the action, giving money to the target player.- Specified by:
execute
in classAction
- Parameters:
target
- The player who will receive the money.- Throws:
IllegalStateException
- if there is no economy system hooked.
-