diff --git a/lib/src/main/kotlin/foundation/esoteric/minecraft/plugins/library/utility/plugin/PluginUtility.kt b/lib/src/main/kotlin/foundation/esoteric/minecraft/plugins/library/utility/plugin/PluginUtility.kt index b05d674..d18aa8f 100644 --- a/lib/src/main/kotlin/foundation/esoteric/minecraft/plugins/library/utility/plugin/PluginUtility.kt +++ b/lib/src/main/kotlin/foundation/esoteric/minecraft/plugins/library/utility/plugin/PluginUtility.kt @@ -1,5 +1,6 @@ package foundation.esoteric.minecraft.plugins.library.utility.plugin +import foundation.esoteric.utility.resource.resourceFilePaths import foundation.esoteric.utility.resource.saveResources import org.bukkit.plugin.Plugin import java.io.File @@ -59,8 +60,8 @@ fun Plugin.saveResource(resourcePath: String) { * @author Esoteric Enderman */ fun Plugin.saveResources(resourceFolderPath: Path): File { - val subFolder = File(dataFolder, resourceFolderPath.toString()) - return resourceFolderPath.saveResources(subFolder) + resourceFolderPath.resourceFilePaths().forEach { saveResource(it.toString()) } + return File(dataFolder, resourceFolderPath.toString()) } /**