Class PlayerAction
java.lang.Object
io.github.lucfr1746.llibrary.action.Action
io.github.lucfr1746.llibrary.action.list.PlayerAction
Represents an action that forces a player to execute a command.
-
Constructor Summary
ConstructorsConstructorDescriptionPlayerAction
(String command) Constructs a PlayerAction with the specified command. -
Method Summary
Modifier and TypeMethodDescriptionvoid
execute
(org.bukkit.entity.Player target) Executes the action, making the target player run the specified command.Gets the command that will be executed by the player.
-
Constructor Details
-
PlayerAction
Constructs a PlayerAction with the specified command.- Parameters:
command
- The command to be executed by the player.
-
-
Method Details
-
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.
-