Table of Contents

Class ContentMigrationService

Namespace
McServerLauncher.Services
Assembly
McServerLauncher.dll

What happens to the mods or plugins already installed when a server changes family.

public static class ContentMigrationService
Inheritance
ContentMigrationService
Inherited Members

Remarks

Converting a NeoForge server to Paper leaves twenty-odd mod jars sitting in mods/. Paper never reads that folder, so they are dead weight — but they are not harmless: the Mods tab is named after the new family while the jars underneath belong to the old one, and the server looks like it kept its content when it has silently lost all of it.

They are moved aside rather than deleted. Someone converting to try Paper out may well convert back, and the app has no business destroying a folder the user spent an evening filling.

Methods

ArchiveIfFamilyChanged(string, ServerType, ServerType, DateTime)

Moves the old family's content folder aside when the type change crosses families.

public static string? ArchiveIfFamilyChanged(string folder, ServerType from, ServerType to, DateTime stamp)

Parameters

folder string

The server folder.

from ServerType

The type the server was.

to ServerType

The type it is becoming.

stamp DateTime

Used to name the archive; taken as an argument so tests are not timing-dependent.

Returns

string

The name of the folder the content was moved to, or null when nothing was moved.

Remarks

Does nothing when the family is unchanged (Paper to Purpur keeps its plugins, Fabric to NeoForge keeps its mods — the jars may not all work, but that is the user's call and the dialog already warns about it). Also does nothing when the folder is empty or absent.