Class ConvertCliTargetFolder

java.lang.Object
me.pauleff.converter.plugins.ConvertCliTargetFolder
All Implemented Interfaces:
DefaultPlugin, MOOCPlugin

public class ConvertCliTargetFolder extends Object implements DefaultPlugin
Converts every regular file under the CLI -customFolder path.

Enabled only when an online/offline conversion is requested and -customFolder is set. Detection still runs against the full server so save format, world layout, and UUID mappings stay accurate; only files inside the target folder are rewritten.

  • Constructor Details

    • ConvertCliTargetFolder

      public ConvertCliTargetFolder()
  • Method Details

    • metadata

      public PluginMetadata metadata()
      Returns the metadata that identifies and describes this plugin.
      Specified by:
      metadata in interface MOOCPlugin
      Returns:
      the plugin metadata
    • isEnabled

      public boolean isEnabled(PluginContext ctx)
      Returns true when a conversion was requested and -customFolder is set.
      Specified by:
      isEnabled in interface DefaultPlugin
      Specified by:
      isEnabled in interface MOOCPlugin
      Parameters:
      ctx - the shared conversion context
      Returns:
      true if this plugin should run; false otherwise
    • setTargets

      public List<Path> setTargets(PluginContext ctx)
      Returns every regular file under the resolved conversion folder.
      Specified by:
      setTargets in interface MOOCPlugin
      Parameters:
      ctx - the shared conversion context
      Returns:
      all regular files beneath the conversion folder; never null
    • run

      public void run(PluginContext ctx, List<Path> resolvedExistingTargets) throws IOException
      Runs UUID conversion on the resolved files via ConverterV3.
      Specified by:
      run in interface MOOCPlugin
      Parameters:
      ctx - the shared conversion context
      resolvedExistingTargets - the existing target paths to process
      Throws:
      IOException - if reading or writing files fails