Make it more clear

This commit is contained in:
Telesphoreo 2022-04-13 23:20:11 -05:00
parent b41015bfd8
commit 5f93b7e1e5
1 changed files with 10 additions and 10 deletions

View File

@ -23,27 +23,27 @@ public class ModuleConfig extends YamlConfiguration
private File file; private File file;
/** /**
* The file name * Where the file is in the module JAR
*/ */
private String name; private String from;
/** /**
* The folder in which the module files are in * Where it should be copied to in the module folder
*/ */
private String folder; private String to;
/** /**
* Creates a config object * Creates a config object
* *
* @param module The module instance * @param module The module instance
* @param name The file name * @param to The file name
*/ */
public ModuleConfig(PlexModule module, String name, String folder) public ModuleConfig(PlexModule module, String from, String to)
{ {
this.module = module; this.module = module;
this.file = new File(module.getDataFolder(), name); this.file = new File(module.getDataFolder(), to);
this.name = name; this.to = to;
this.folder = folder; this.from = from;
if (!file.exists()) if (!file.exists())
{ {
@ -85,7 +85,7 @@ public class ModuleConfig extends YamlConfiguration
{ {
try try
{ {
Files.copy(module.getClass().getResourceAsStream("/" + folder), this.file.toPath()); Files.copy(module.getClass().getResourceAsStream("/" + from), this.file.toPath());
} }
catch (IOException e) catch (IOException e)
{ {