Skip to content

Commit 05480c8

Browse files
committed
Also use fluent getter
1 parent ca8012d commit 05480c8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

paper-api/src/main/java/org/bukkit/WorldCreator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ public WorldCreator parentDirectory(@NotNull Path override) {
238238
* @return the parent directory used for world storage
239239
*/
240240
@NotNull
241-
public Path getParentDirectory() {
241+
public Path parentDirectory() {
242242
return this.parentDirectory;
243243
}
244244

paper-server/src/main/java/org/bukkit/craftbukkit/CraftServer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1182,7 +1182,7 @@ public World createWorld(WorldCreator creator) {
11821182
String name = creator.name();
11831183
ChunkGenerator chunkGenerator = creator.generator();
11841184
BiomeProvider biomeProvider = creator.biomeProvider();
1185-
File folder = new File(creator.getParentDirectory().toFile(), name);
1185+
File folder = new File(creator.parentDirectory().toFile(), name);
11861186
World world = this.getWorld(name);
11871187

11881188
// Paper start
@@ -1219,7 +1219,7 @@ public World createWorld(WorldCreator creator) {
12191219
Path serverRoot = this.getWorldContainer().toPath();
12201220
// Make sure parsing off server root for symlinks
12211221
DirectoryValidator directoryValidator = LevelStorageSource.parseValidator(serverRoot.resolve("allowed_symlinks.txt"));
1222-
LevelStorageSource levelStorageSource = new LevelStorageSource(creator.getParentDirectory(), serverRoot.resolve("../backups"), directoryValidator, DataFixers.getDataFixer());
1222+
LevelStorageSource levelStorageSource = new LevelStorageSource(creator.parentDirectory(), serverRoot.resolve("../backups"), directoryValidator, DataFixers.getDataFixer());
12231223

12241224
levelStorageAccess = levelStorageSource.validateAndCreateAccess(name, actualDimension);
12251225
} catch (IOException | ContentValidationException ex) {

0 commit comments

Comments
 (0)