Skip to content

Commit

Permalink
Use Bukkit saveResource method
Browse files Browse the repository at this point in the history
  • Loading branch information
EsotericEnderman committed Nov 3, 2024
1 parent 2ec69f6 commit 01e5ebb
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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())
}

/**
Expand Down

0 comments on commit 01e5ebb

Please sign in to comment.