Skip to content

Commit bde75c7

Browse files
committed
Change WorldManager#worldDirectory to always return valid location
1 parent 5afbdb1 commit bde75c7

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/main/java/org/spongepowered/api/world/server/WorldManager.java

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,14 @@ public interface WorldManager {
5555
Optional<ServerWorld> world(ResourceKey key);
5656

5757
/**
58-
* Gets a {@link Path directory} that exists for the provided {@link ResourceKey world key}.
58+
* Gets a {@link Path directory} that is used for the world's data
59+
* identified by {@link ResourceKey world key}. It is not guaranteed
60+
* the path will exist until the world is formally loaded by the game.
5961
*
60-
* <p>It is not required for the implementation to validate that the directory contains a proper world,
61-
* only that the directory exists.</p>
62-
*
63-
* @param key The key
64-
* @return The directory or {@link Optional#empty()} if not found
62+
* @param key The world's identifier key
63+
* @return The directory to be used if it doesn't exist
6564
*/
66-
Optional<Path> worldDirectory(ResourceKey key);
65+
Path worldDirectory(ResourceKey key);
6766

6867
/**
6968
* Gets all currently loaded {@link ServerWorld worlds}.

0 commit comments

Comments
 (0)