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
folderstringThe server folder.
fromServerTypeThe type the server was.
toServerTypeThe type it is becoming.
stampDateTimeUsed 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.