Table of Contents

Class StoreItem

Namespace
McServerLauncher.Models.Store
Assembly
McServerLauncher.dll

What the store knows about one thing it can offer, independently of where it came from.

Today everything is a Modrinth mod or plugin, and the two Modrinth shapes (a search hit and a full project) carry the same facts under slightly different names. Tagging and summarising work on this type instead of on either of them, so a shader, a resource pack or a modpack — or a second source altogether — only needs its own conversion, not its own classifier.

public class StoreItem
Inheritance
StoreItem
Inherited Members

Properties

Author

Author name when the source knows it. Search results carry it; the project endpoint doesn't (it returns a team id instead), so an empty value means "look it up", not "no author".

public string Author { get; init; }

Property Value

string

Categories

Raw category slugs, loaders included (that is how Modrinth stores them).

public IReadOnlyList<string> Categories { get; init; }

Property Value

IReadOnlyList<string>

ClientSide

"required", "optional", "unsupported" or "unknown" — null when unknown.

public string? ClientSide { get; init; }

Property Value

string

Description

The author's own one-line summary.

public string Description { get; init; }

Property Value

string

Downloads

public long Downloads { get; init; }

Property Value

long

Environment

Modrinth's environment words, when the source sent them.

public IReadOnlyList<string> Environment { get; init; }

Property Value

IReadOnlyList<string>

Followers

public int Followers { get; init; }

Property Value

int

IconUrl

public string? IconUrl { get; init; }

Property Value

string

Id

public string Id { get; init; }

Property Value

string

NeedsClient

True when players must install it too, not only the server. A client-only mod is not this: it has nothing to do on the server at all and has its own badge.

public bool NeedsClient { get; }

Property Value

bool

ProjectType

"mod", "plugin"… Empty when the source didn't say.

public string ProjectType { get; init; }

Property Value

string

ServerSide

"required", "optional", "unsupported" or "unknown" — null when unknown.

public string? ServerSide { get; init; }

Property Value

string

Side

Where it runs. A server that says "unsupported" settles it: nothing can be done with the project on a server, whatever the client side says. Half an answer ("required" on one side, nothing on the other) stays Unknown rather than being guessed.

public InstallSide Side { get; }

Property Value

InstallSide

Slug

public string Slug { get; init; }

Property Value

string

Title

public string Title { get; init; }

Property Value

string

Updated

public DateTimeOffset? Updated { get; init; }

Property Value

DateTimeOffset?

Methods

From(ProjectDetail, string?)

public static StoreItem From(ProjectDetail project, string? projectType = null)

Parameters

project ProjectDetail

A full project.

projectType string

See From(ProjectResult, string?).

Returns

StoreItem

From(ProjectResult, string?)

public static StoreItem From(ProjectResult hit, string? projectType = null)

Parameters

hit ProjectResult

A search result.

projectType string

What the store is showing: "mod" or "plugin". Modrinth calls every search hit a "mod", including the plugins a Paper server is shown, so the answer has to come from the server the store is open for. Null keeps whatever the hit says.

Returns

StoreItem