Class PlayerAction

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

public class PlayerAction extends Action
Represents an action that forces a player to execute a command.
  • Constructor Details

    • PlayerAction

      public PlayerAction(String command)
      Constructs a PlayerAction with the specified command.
      Parameters:
      command - The command to be executed by the player.
  • Method Details

    • getCommand

      public String getCommand()
      Gets the command that will be executed by the player.
      Returns:
      The command string.
    • execute

      public void execute(org.bukkit.entity.Player target)
      Executes the action, making the target player run the specified command.
      Specified by:
      execute in class Action
      Parameters:
      target - The player who will execute the command.