use of de.dytanic.cloudnet.lib.server.template.Template in project CloudNet by Dytanic.
the class CloudNet method setupGroup.
/*===============================================================================================================*/
@Deprecated
public void setupGroup(ServerGroup serverGroup) {
Path path;
for (Template template : serverGroup.getTemplates()) {
path = Paths.get("local/templates/" + serverGroup.getName() + NetworkUtils.SLASH_STRING + template.getName());
if (!Files.exists(path)) {
try {
Files.createDirectories(path);
Files.createDirectories(Paths.get("local/templates/" + serverGroup.getName() + NetworkUtils.SLASH_STRING + template.getName() + "/plugins"));
FileCopy.insertData("files/server.properties", "local/templates/" + serverGroup.getName() + NetworkUtils.SLASH_STRING + template.getName() + "/server.properties");
} catch (IOException e) {
e.printStackTrace();
}
}
}
path = Paths.get("local/templates/" + serverGroup.getName() + "/globaltemplate");
if (!Files.exists(path)) {
try {
Files.createDirectories(path);
Files.createDirectories(Paths.get("local/templates/" + serverGroup.getName() + "/globaltemplate/plugins"));
FileCopy.insertData("files/server.properties", "local/templates/" + serverGroup.getName() + "/globaltemplate/server.properties");
} catch (IOException e) {
e.printStackTrace();
}
}
}
Aggregations