Class WorldNameChecker


  • public class WorldNameChecker
    extends java.lang.Object

    Utility class in helping to check the status of a world name and it's associated world folder.

    Note this is for preliminary checks and better command output. A valid result will suggest but not 100% determine that a world name can be created, loaded or imported.

    • Constructor Detail

      • WorldNameChecker

        public WorldNameChecker()
    • Method Detail

      • isValidWorldName

        public static boolean isValidWorldName​(@Nullable
                                               @Nullable java.lang.String worldName)
        Checks if a world name is valid.
        Parameters:
        worldName - The world name to check on.
        Returns:
        True if check result is valid, else false.
      • checkName

        @NotNull
        public static @NotNull WorldNameChecker.NameStatus checkName​(@Nullable
                                                                     @Nullable java.lang.String worldName)
        Checks the current validity status of a world name.
        Parameters:
        worldName - The world name to check on.
        Returns:
        The resulting name status.
      • isValidWorldFolder

        public static boolean isValidWorldFolder​(@Nullable
                                                 @Nullable java.lang.String worldName)
        Checks if a world name has a valid world folder.
        Parameters:
        worldName - The world name to check on.
        Returns:
        True if check result is valid, else false.
      • isValidWorldFolder

        public static boolean isValidWorldFolder​(@Nullable
                                                 @Nullable java.io.File worldFolder)
        Checks if a world folder is valid.
        Parameters:
        worldFolder - The world folder to check on.
        Returns:
        True if check result is valid, else false.
      • checkFolder

        @NotNull
        public static @NotNull WorldNameChecker.FolderStatus checkFolder​(@Nullable
                                                                         @Nullable java.lang.String worldName)
        Checks the current folder status for a world name.
        Parameters:
        worldName - The world name to check on.
        Returns:
        The resulting folder status.
      • checkFolder

        @NotNull
        public static @NotNull WorldNameChecker.FolderStatus checkFolder​(@Nullable
                                                                         @Nullable java.io.File worldFolder)
        Checks the current folder status.
        Parameters:
        worldFolder - The world folder to check on.
        Returns:
        The resulting folder status.