Class GiveExpAction

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

public class GiveExpAction extends Action
Represents an action that gives experience points to a player.
  • Constructor Summary

    Constructors
    Constructor
    Description
    GiveExpAction(int amount)
    Constructs a GiveExpAction with the specified amount of experience points.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    execute(org.bukkit.entity.Player target)
    Executes the action, giving experience points to the target player.
    int
    Gets the amount of experience to be given.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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.
      Specified by:
      execute in class Action
      Parameters:
      target - The player who will receive the experience.