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 TypeMethodDescriptionmetadata()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 DefaultPlugin
isEnabledModifier and TypeMethodDescriptiondefault booleanisEnabled(PluginContext ctx) Always returnstrue, so the plugin runs for everyPluginContext.Methods 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
-
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
-