mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2025-01-25 09:41:23 +01:00
Filter away already loaded worlds for getPotentialWorlds
This commit is contained in:
parent
fda0e038f5
commit
8fc2371077
@ -350,7 +350,9 @@ public class WorldManager {
|
||||
if (files == null) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
return Arrays.stream(files).filter(worldNameChecker::isValidWorldFolder)
|
||||
return Arrays.stream(files)
|
||||
.filter(file -> !isOfflineWorld(file.getName()))
|
||||
.filter(worldNameChecker::isValidWorldFolder)
|
||||
.map(File::getName)
|
||||
.toList();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user