static @NotNull ChatType chatType(final @NotNull Keyed key) {
    return key instanceof ChatType ? (ChatType) key : new ChatTypeImpl(requireNonNull(key, "key").key());
  }
Creates a new chat type with a given key.

@param key the key
@return the chat type
@since 4.12.0
api/src/main/java/net/kyori/adventure/chat/ChatType.java