static Tag create(final ArgumentQueue args, final Context ctx) {
    double phase = 0;
    String flag = PRIDE;

    if (args.hasNext()) {
      final String value = args.pop().value().toLowerCase(Locale.ROOT);
      if (FLAGS.containsKey(value)) {
        flag = value;
      } else if (!value.isEmpty()) {
        try {
          phase = Double.parseDouble(value);
        } catch (final NumberFormatException ex) {
          throw ctx.newException("Expected phase, got " + value);
        }

        if (phase < -1d || phase > 1d) {
          throw ctx.newException(String.format("Gradient phase is out of range (%s). Must be in the range [-1.0, 1.0] (inclusive).", phase), args);
        }
      }
    }

    return new PrideTag(phase, FLAGS.get(flag), flag, ctx);
  }
Applies pride flags to a component.

@since 4.18.0
text-minimessage/src/main/java/net/kyori/adventure/text/minimessage/tag/standard/PrideTag.java