Add worldDirectory to WorldManager.
This allows getting the location on a disk for a given world key.
import org.spongepowered.api.ResourceKey;
import org.spongepowered.api.Server;
import org.spongepowered.api.world.server.storage.ServerWorldProperties;
-import org.spongepowered.api.world.storage.WorldProperties;
+import java.nio.file.Path;
import java.util.Collection;
import java.util.List;
import java.util.Optional;
*/
Optional<ServerWorld> world(ResourceKey key);
+ /**
+ * Gets a {@link Path directory} that exists for the provided {@link ResourceKey world key}.
+ *
+ * <p>It is not required for the implementation to validate that the directory contains a proper world,
+ * only that the directory exists.</p>
+ *
+ * @param key The key
+ * @return The directory or {@link Optional#empty()} if not found
+ */
+ Optional<Path> worldDirectory(ResourceKey key);
+
/**
* Gets the {@link ServerWorld default world}.
*
