Class CopyCliPlayerData
java.lang.Object
me.pauleff.converter.plugins.CopyCliPlayerData
- All Implemented Interfaces:
DefaultPlugin, MOOCPlugin
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanisEnabled(PluginContext ctx) Returnstruewhen the-copyCLI option was provided.metadata()Returns the metadata that identifies and describes this plugin.voidrun(PluginContext ctx, List<Path> resolvedExistingTargets) Prompts for confirmation and copies player data from the source world to the destination.setTargets(PluginContext ctx) Returns the resolved source world folder and the destination world folder.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface MOOCPlugin
logger, returnAllFilesInFolders
-
Constructor Details
-
CopyCliPlayerData
public CopyCliPlayerData()
-
-
Method Details
-
metadata
Returns the metadata that identifies and describes this plugin.- Specified by:
metadatain interfaceMOOCPlugin- Returns:
- the plugin metadata
-
isEnabled
Returnstruewhen the-copyCLI option was provided.- Specified by:
isEnabledin interfaceDefaultPlugin- Specified by:
isEnabledin interfaceMOOCPlugin- Parameters:
ctx- the shared conversion context- Returns:
trueif player-data copying was requested;falseotherwise
-
setTargets
Returns the resolved source world folder and the destination world folder.- Specified by:
setTargetsin interfaceMOOCPlugin- Parameters:
ctx- the shared conversion context- Returns:
- a two-element list of source then destination world paths
-
run
Prompts for confirmation and copies player data from the source world to the destination.- Specified by:
runin interfaceMOOCPlugin- Parameters:
ctx- the shared conversion contextresolvedExistingTargets- expected to contain source and destination world folders- Throws:
IOException- if confirmation I/O or file copying fails
-