Class GivePermissionAction

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

public class GivePermissionAction extends Action
Represents an action that grants a permission to a player.
  • Constructor Details

    • GivePermissionAction

      public GivePermissionAction(String permission)
      Constructs a GivePermissionAction with the specified permission.
      Parameters:
      permission - The permission to grant to the player.
  • Method Details

    • getPermission

      public String getPermission()
      Gets the permission that will be granted.
      Returns:
      The permission string.
    • execute

      public void execute(org.bukkit.entity.Player target)
      Executes the action, granting the specified permission to the target player.
      Specified by:
      execute in class Action
      Parameters:
      target - The player who will receive the permission.
      Throws:
      IllegalStateException - if there is no permission system hooked.