Class ConsoleAction

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

public class ConsoleAction extends Action
Represents an action that executes a console command.
  • Constructor Details

    • ConsoleAction

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

    • getCommand

      public String getCommand()
      Gets the command to be executed.
      Returns:
      The command as a string.
    • execute

      public void execute(org.bukkit.entity.Player target)
      Executes the console command, replacing placeholders if PlaceholderAPI is enabled.
      Specified by:
      execute in class Action
      Parameters:
      target - The player whose placeholders will be used for the command.