Added {NAME} replacement in database location

This commit is contained in:
Dinnerbone
2011-04-01 16:51:33 +01:00
parent 8ba69aaf28
commit 3fb7d7e240

View File

@@ -188,7 +188,9 @@ public abstract class JavaPlugin implements Plugin {
}
private String replaceDatabaseString(String input) {
return input.replaceAll("\\{DIR\\}", getDataFolder().getPath().replaceAll("\\\\", "/"));
input = input.replaceAll("\\{DIR\\}", getDataFolder().getPath().replaceAll("\\\\", "/") + "/");
input = input.replaceAll("\\{NAME\\}", getDescription().getName().replaceAll("[^\\w_-]", ""));
return input;
}
/**