public <V extends DataComponentValue> @NotNull Map<Key, V> dataComponentsAs(final @NotNull Class<V> targetType) {
      if (this.dataComponents.isEmpty()) {
        return Collections.emptyMap();
      } else {
        final Map<Key, V> results = new HashMap<>(this.dataComponents.size());
        for (final Map.Entry<Key, DataComponentValue> entry : this.dataComponents.entrySet()) {
          results.put(entry.getKey(), DataComponentValueConverterRegistry.convert(targetType, entry.getKey(), entry.getValue()));
        }
        return Collections.unmodifiableMap(results);
      }
    }
Return an unmodifiable map of data components coerced to the target type.

<p>If there is no converter registered with the {@link DataComponentValueConverterRegistry} for the conversion of a value, a {@link IllegalArgumentException} will be thrown.</p>

@param targetType the expected target type
@param <V> the new data component value type
@return the unmodifiable map
@since 4.17.0
api/src/main/java/net/kyori/adventure/text/event/HoverEvent.java