mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2024-11-10 21:01:17 +01:00
Use .get() for world folder, since it should fail if null
This commit is contained in:
parent
481933b948
commit
a4a5be20f9
@ -558,8 +558,7 @@ public class WorldManager {
|
||||
|
||||
private Attempt<CloneWorldOptions, CloneFailureReason> cloneWorldCopyFolder(
|
||||
@NotNull CloneWorldOptions options) {
|
||||
// TODO: Check null?
|
||||
File worldFolder = options.world().getBukkitWorld().map(World::getWorldFolder).getOrNull();
|
||||
File worldFolder = options.world().getBukkitWorld().map(World::getWorldFolder).get();
|
||||
File newWorldFolder = new File(Bukkit.getWorldContainer(), options.newWorldName());
|
||||
return filesManipulator.copyFolder(worldFolder, newWorldFolder, CLONE_IGNORE_FILES).fold(
|
||||
exception -> worldActionResult(CloneFailureReason.COPY_FAILED,
|
||||
|
Loading…
Reference in New Issue
Block a user