Class DetectWorldFolderStructure
java.lang.Object
me.pauleff.converter.plugins.DetectWorldFolderStructure
- All Implemented Interfaces:
DefaultPlugin, MOOCPlugin
Detects how dimension folders are laid out relative to the world and stores the
result on the
PluginContext.
Distinguishes a single world folder (classic DIM* or 2026-style
dimensions/minecraft), per-dimension sibling folders, and unknown layouts.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanisEnabled(PluginContext ctx) Skips world layout detection when the user supplied the conversion targets explicitly.metadata()Returns the metadata that identifies and describes this plugin.voidrun(PluginContext ctx, List<Path> resolvedExistingTargets) Sets the world folder structure on the context from the server and world layout.setTargets(PluginContext ctx) Returns the server root 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 MOOCPlugin
logger, returnAllFilesInFolders
-
Constructor Details
-
DetectWorldFolderStructure
public DetectWorldFolderStructure()
-
-
Method Details
-
metadata
Returns the metadata that identifies and describes this plugin.- Specified by:
metadatain interfaceMOOCPlugin- Returns:
- the plugin metadata
-
isEnabled
Skips world layout detection when the user supplied the conversion targets explicitly.- Specified by:
isEnabledin interfaceDefaultPlugin- Specified by:
isEnabledin interfaceMOOCPlugin- Parameters:
ctx- the shared conversion context- Returns:
trueunless conversion is limited to a custom folder or file
-
setTargets
Returns the server root folder as the sole detection target.- Specified by:
setTargetsin interfaceMOOCPlugin- Parameters:
ctx- the shared conversion context- Returns:
- a single-element list containing the server folder
-
run
Sets the world folder structure on the context from the server and world layout.- Specified by:
runin interfaceMOOCPlugin- Parameters:
ctx- the shared conversion contextresolvedExistingTargets- unused; detection inspects folders fromctx- Throws:
IOException- if listing server or world directories failsUnknownWorldFolderStructureException- if a single world folder has no recognized dimension layout
-