Browse Source

30.04.2018 -- Fixing

master
Niklas Hartmann 1 year ago
parent
commit
a1d4824e28
3 changed files with 6 additions and 4 deletions
  1. +1
    -1
      pom.xml
  2. +3
    -1
      src/main/java/de/moddylp/simplecommentconfig/ConfigManager.java
  3. +2
    -2
      src/main/java/de/moddylp/simplecommentconfig/Serilizer.java

+ 1
- 1
pom.xml View File

@@ -6,7 +6,7 @@

<groupId>de.moddylp</groupId>
<artifactId>simplecommentconfig</artifactId>
<version>20180403</version>
<version>20180430</version>

<distributionManagement>
<repository>

+ 3
- 1
src/main/java/de/moddylp/simplecommentconfig/ConfigManager.java View File

@@ -22,7 +22,9 @@ public class ConfigManager {
try {
File configfile = new File(path);
if (!configfile.exists()) {
configfile.getParentFile().mkdirs();
if (path.contains("/") || path.contains("\\")) {
configfile.getParentFile().mkdirs();
}
configfile.createNewFile();
}
Config config = new Config(configfile);

+ 2
- 2
src/main/java/de/moddylp/simplecommentconfig/Serilizer.java View File

@@ -25,12 +25,12 @@ public class Serilizer {
}
return objects;
} else {
return value.replaceAll("\'", "");
return value.replaceAll("\'", "").replace( "\\n", "<br>");
}
}
public static String convertObjecttoString(Object value) {
if (value instanceof String) {
return "\'"+value.toString()+"\'";
return "\'"+value.toString().replace("<br>", "\\n")+"\'";
} else if (value instanceof Double) {
return Double.toString((Double)value);
}else if (value instanceof Integer) {

Loading…
Cancel
Save