copyResource

fun copyResource(plugin: JavaPlugin, res: String)

Copies a resource file from the plugin's JAR file to the plugin's data folder.

Parameters

plugin

The JavaPlugin instance of the plugin.

res

The resource file path within the JAR file to copy.

Throws

If an I/O error occurs during copying.