Class ContentManifest
- Namespace
- McServerLauncher.Services
- Assembly
- McServerLauncher.dll
What a mod or plugin jar says about itself: the names it provides, and the ones it needs.
public static class ContentManifest
- Inheritance
-
ContentManifest
- Inherited Members
Remarks
The jar is the authority, not the store. Verified live in August 2026: Explorify declares no
dependencies at all on Modrinth while its own fabric.mod.json requires fabric-api,
which is exactly the crash that started this. Asking the store also means asking the network,
and the two calls that would answer swallow every error and return an empty result — offline,
the app would cheerfully report that nothing is missing right before the server failed to boot.
Reading the jars answers the same question in milliseconds, with no network and no lying.
Three formats, because "all your mods and plugins" is not true otherwise: Fabric's
fabric.mod.json, Bukkit's plugin.yml (which Paper and Purpur use), and
Forge/NeoForge's mods.toml. Only the handful of keys that name things is parsed — no YAML
or TOML library is added for it, the same choice already made for Geyser's config. Anything this
does not understand reads as "declares nothing", which is the safe direction: the check stays
quiet rather than blocking a start over something it misread.
Methods
FolderOf(ServerConfig)
The content folder of a server, whether it takes mods or plugins.
public static string FolderOf(ServerConfig config)
Parameters
configServerConfig
Returns
IsContentFile(string)
A .jar or a .jar.disabled: what the content tab lists.
public static bool IsContentFile(string path)
Parameters
pathstring
Returns
Read(string)
Reads a jar's manifest. Never throws: an unreadable jar declares nothing.
public static ContentManifest.Manifest Read(string jarPath)
Parameters
jarPathstring
Returns
ReadAll(string, Func<string, Manifest>?)
Every jar in a content folder, the disabled ones too.
public static IReadOnlyList<ContentManifest.Entry> ReadAll(string folder, Func<string, ContentManifest.Manifest>? read = null)
Parameters
folderstringThe content folder.
readFunc<string, ContentManifest.Manifest>How to read one jar; a cache passes itself here.
Returns
Remarks
The opposite choice to ReadFolder(string), for the opposite question. Which jars load is a question about enabled ones only; which jars are copies of the same mod is not — a disabled old version is exactly the leftover that has to go when the mod is updated.
ReadFolder(string)
Every enabled jar in a server's content folder.
public static IReadOnlyList<ContentManifest.Manifest> ReadFolder(string folder)
Parameters
folderstring
Returns
Remarks
.jar.disabled files are skipped, and that is the whole point of the extension: a
disabled mod neither provides anything nor needs anything, and counting it would both hide a
real gap and invent a fake one.