Class GiveMoneyAction

java.lang.Object
io.github.lucfr1746.llibrary.action.Action
io.github.lucfr1746.llibrary.action.list.GiveMoneyAction

public class GiveMoneyAction extends Action
Represents an action that gives money to a player using an economy system.
  • Constructor Details

    • GiveMoneyAction

      public GiveMoneyAction(Double amount)
      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

      public Double 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 class Action
      Parameters:
      target - The player who will receive the money.
      Throws:
      IllegalStateException - if there is no economy system hooked.