Class DetectSaveFileFormat
java.lang.Object
me.pauleff.converter.plugins.DetectSaveFileFormat
- All Implemented Interfaces:
DefaultPlugin, MOOCPlugin
Detects the world's region save format (Anvil vs McRegion) and stores it on the
PluginContext.
If McRegion is detected, the process exits early because UUID-based conversion is not needed for pre-1.7.6 worlds.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionmetadata()Returns the metadata that identifies and describes this plugin.voidrun(PluginContext ctx, List<Path> resolvedExistingTargets) Sets the save file format on the context, or exits if McRegion (pre-UUID) is found.setTargets(PluginContext ctx) Returns the world folder as the sole detection target.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface DefaultPlugin
isEnabledModifier and TypeMethodDescriptiondefault booleanisEnabled(PluginContext ctx) Always returnstrue, so the plugin runs for everyPluginContext.Methods inherited from interface MOOCPlugin
logger, returnAllFilesInFolders
-
Constructor Details
-
DetectSaveFileFormat
public DetectSaveFileFormat()
-
-
Method Details
-
metadata
Returns the metadata that identifies and describes this plugin.- Specified by:
metadatain interfaceMOOCPlugin- Returns:
- the plugin metadata
-
setTargets
Returns the world folder as the sole detection target.- Specified by:
setTargetsin interfaceMOOCPlugin- Parameters:
ctx- the shared conversion context- Returns:
- a single-element list containing the world folder
-
run
Sets the save file format on the context, or exits if McRegion (pre-UUID) is found.- Specified by:
runin interfaceMOOCPlugin- Parameters:
ctx- the shared conversion contextresolvedExistingTargets- unused; detection walks the world folder fromctx- Throws:
IOException- if walking the world folder fails
-