File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
src/main/java/org/spongepowered/api/world/server Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 2727import org .spongepowered .api .ResourceKey ;
2828import org .spongepowered .api .Server ;
2929import org .spongepowered .api .world .server .storage .ServerWorldProperties ;
30- import org .spongepowered .api .world .storage .WorldProperties ;
3130
31+ import java .nio .file .Path ;
3232import java .util .Collection ;
3333import java .util .List ;
3434import java .util .Optional ;
@@ -53,6 +53,17 @@ public interface WorldManager {
5353 */
5454 Optional <ServerWorld > world (ResourceKey key );
5555
56+ /**
57+ * Gets a {@link Path directory} that exists for the provided {@link ResourceKey world key}.
58+ *
59+ * <p>It is not required for the implementation to validate that the directory contains a proper world,
60+ * only that the directory exists.</p>
61+ *
62+ * @param key The key
63+ * @return The directory or {@link Optional#empty()} if not found
64+ */
65+ Optional <Path > worldDirectory (ResourceKey key );
66+
5667 /**
5768 * Gets the {@link ServerWorld default world}.
5869 *
You can’t perform that action at this time.
0 commit comments