Added {NAME} replacement in database location

This commit is contained in:
Dinnerbone 2011-04-01 16:51:33 +01:00
parent 4415112ea3
commit 3f2a31fa5e

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;
}
/**