Skip to content

Commit

Permalink
fix: Only consider JARs in file acquisition from mods-directory
Browse files Browse the repository at this point in the history
  • Loading branch information
Griefed committed Sep 16, 2023
1 parent fa13be3 commit 7bb6807
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import org.apache.logging.log4j.kotlin.logger
import java.awt.Image
import java.awt.image.BufferedImage
import java.io.File
import java.io.FilenameFilter

Check warning on line 33 in serverpackcreator-api/src/jvmMain/kotlin/de/griefed/serverpackcreator/api/ServerPackHandler.kt

View workflow job for this annotation

GitHub Actions / Qodana Community for JVM

Unused import directive

Unused import directive
import java.io.IOException
import java.net.MalformedURLException
import java.nio.file.Files
Expand Down Expand Up @@ -766,7 +767,7 @@ actual class ServerPackHandler actual constructor(
modloader: String
): List<File> {
log.info("Preparing a list of mods to include in server pack...")
val filesInModsDir: Collection<File> = File(modsDir).filteredWalk(modFileEndings, FilterType.ENDS_WITH)
val filesInModsDir: Collection<File> = File(modsDir).list().filter { entry -> modFileEndings.any { entry.endsWith(it) } }.map { File(it) }
val modsInModpack = TreeSet(filesInModsDir)
val autodiscoveredClientMods: MutableList<File> = ArrayList(100)

Expand Down

0 comments on commit 7bb6807

Please sign in to comment.