Class ConvertCliTargetFile
java.lang.Object
me.pauleff.converter.plugins.ConvertCliTargetFile
- All Implemented Interfaces:
DefaultPlugin, MOOCPlugin
Converts the single file specified by the CLI
-customFile option.
Enabled only when an online/offline conversion is requested and -customFile is set.
Detection still runs against the full server so save format, world layout, and UUID
mappings stay accurate; only the target file is rewritten.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanisEnabled(PluginContext ctx) Returnstruewhen a conversion was requested and-customFileis set.metadata()Returns the metadata that identifies and describes this plugin.voidrun(PluginContext ctx, List<Path> resolvedExistingTargets) Runs UUID conversion on the resolved file viaConverterV3.setTargets(PluginContext ctx) Returns the resolved conversion file as the sole target.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface MOOCPlugin
logger, returnAllFilesInFolders
-
Constructor Details
-
ConvertCliTargetFile
public ConvertCliTargetFile()
-
-
Method Details
-
metadata
Returns the metadata that identifies and describes this plugin.- Specified by:
metadatain interfaceMOOCPlugin- Returns:
- the plugin metadata
-
isEnabled
Returnstruewhen a conversion was requested and-customFileis set.- Specified by:
isEnabledin interfaceDefaultPlugin- Specified by:
isEnabledin interfaceMOOCPlugin- Parameters:
ctx- the shared conversion context- Returns:
trueif this plugin should run;falseotherwise
-
setTargets
Returns the resolved conversion file as the sole target.- Specified by:
setTargetsin interfaceMOOCPlugin- Parameters:
ctx- the shared conversion context- Returns:
- a single-element list containing the conversion file
-
run
Runs UUID conversion on the resolved file viaConverterV3.- Specified by:
runin interfaceMOOCPlugin- Parameters:
ctx- the shared conversion contextresolvedExistingTargets- the existing target paths to process- Throws:
IOException- if reading or writing files fails
-