Enum Class WorldFolderStructure

java.lang.Object
java.lang.Enum<WorldFolderStructure>
me.pauleff.converter.WorldFolderStructure
All Implemented Interfaces:
Serializable, Comparable<WorldFolderStructure>, Constable

public enum WorldFolderStructure extends Enum<WorldFolderStructure>
Describes how a Minecraft world's dimensions are laid out under the server folder.

Each constant carries a human-readable description returned by toString(). dimensionRootFolders(Path, Path) resolves the concrete dimension roots for a given server and world folder.

  • Enum Constant Details

    • SINGLE

      public static final WorldFolderStructure SINGLE
      Standard Vanilla layout: a single world folder containing the overworld plus DIM1 and DIM-1.
    • PER_DIMENSION

      public static final WorldFolderStructure PER_DIMENSION
      Bukkit-style layout with separate world, world_nether, and world_the_end folders beside the server root.
    • SINGLE_2026

      public static final WorldFolderStructure SINGLE_2026
      Vanilla layout introduced in 2026.1 with world data under a dimensions subdirectory.
  • Method Details

    • values

      public static WorldFolderStructure[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static WorldFolderStructure valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • toString

      public String toString()
      Returns the human-readable description of this world folder structure.
      Overrides:
      toString in class Enum<WorldFolderStructure>
      Returns:
      the description associated with this constant
    • dimensionRootFolders

      public List<Path> dimensionRootFolders(Path serverFolder, Path worldFolder)
      Resolves the dimension root folders for this structure under the given server and world paths.

      The returned paths are the roots that conversion plugins walk for player and world files. For PER_DIMENSION, sibling nether and end folders are derived from the world folder name. For SINGLE_2026, dimension and players subpaths under the world folder are returned.

      Parameters:
      serverFolder - the server root folder
      worldFolder - the primary world folder from server.properties
      Returns:
      the dimension (and related) root folders to process; never null