Skip to content

Commit

Permalink
Fixed non directory files in data directory
Browse files Browse the repository at this point in the history
  • Loading branch information
mysticdrew committed Mar 26, 2023
1 parent b27cbce commit 7e7b0ad
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ plugins {

group 'info.journeymap.tools'
targetCompatibility = 1.11
version '1.2-SNAPSHOT'
version '1.3-SNAPSHOT'

repositories {
mavenCentral()
Expand Down
8 changes: 5 additions & 3 deletions src/main/kotlin/info/journeymap/tools/models/World.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ class World(val directory: File) {
val dimensions: MutableList<Dimension> = mutableListOf()

this.directory.listFiles()!!.forEach {
val dimension = Dimension(it)
if (dimension.mapTypes.isNotEmpty() || dimension.layers.isNotEmpty()) {
dimensions.add(dimension)
if(it.isDirectory) {
val dimension = Dimension(it)
if (dimension.mapTypes.isNotEmpty() || dimension.layers.isNotEmpty()) {
dimensions.add(dimension)
}
}
}

Expand Down

0 comments on commit 7e7b0ad

Please sign in to comment.