mirror of
https://github.com/plexusorg/Plex.git
synced 2024-12-22 17:17:37 +00:00
Make it more clear
This commit is contained in:
parent
b41015bfd8
commit
5f93b7e1e5
@ -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)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user