Class WorldNameChecker
- java.lang.Object
-
- com.onarandombox.MultiverseCore.utils.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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
WorldNameChecker.FolderStatus
Result after checking validity of world folder.static class
WorldNameChecker.NameStatus
Result after checking validity of world name.
-
Constructor Summary
Constructors Constructor Description WorldNameChecker()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static @NotNull WorldNameChecker.FolderStatus
checkFolder(@Nullable java.io.File worldFolder)
Checks the current folder status.static @NotNull WorldNameChecker.FolderStatus
checkFolder(@Nullable java.lang.String worldName)
Checks the current folder status for a world name.static @NotNull WorldNameChecker.NameStatus
checkName(@Nullable java.lang.String worldName)
Checks the current validity status of a world name.static boolean
isValidWorldFolder(@Nullable java.io.File worldFolder)
Checks if a world folder is valid.static boolean
isValidWorldFolder(@Nullable java.lang.String worldName)
Checks if a world name has a valid world folder.static boolean
isValidWorldName(@Nullable java.lang.String worldName)
Checks if a world name is valid.
-
-
-
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.
-
-