Class CopyCliPlayerData

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

public class CopyCliPlayerData extends Object implements DefaultPlugin
Copies player data from a CLI-specified source world into the current world.

Enabled when -copy <world-name> is set. Prompts for confirmation before copying playerdata and UUID-named files across matching dimension roots.

  • Constructor Details

    • CopyCliPlayerData

      public CopyCliPlayerData()
  • 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 the -copy CLI option was provided.
      Specified by:
      isEnabled in interface DefaultPlugin
      Specified by:
      isEnabled in interface MOOCPlugin
      Parameters:
      ctx - the shared conversion context
      Returns:
      true if player-data copying was requested; false otherwise
    • setTargets

      public List<Path> setTargets(PluginContext ctx)
      Returns the resolved source world folder and the destination world folder.
      Specified by:
      setTargets in interface MOOCPlugin
      Parameters:
      ctx - the shared conversion context
      Returns:
      a two-element list of source then destination world paths
    • run

      public void run(PluginContext ctx, List<Path> resolvedExistingTargets) throws IOException
      Prompts for confirmation and copies player data from the source world to the destination.
      Specified by:
      run in interface MOOCPlugin
      Parameters:
      ctx - the shared conversion context
      resolvedExistingTargets - expected to contain source and destination world folders
      Throws:
      IOException - if confirmation I/O or file copying fails