replaceAll => replace for dollar sign compatibility.

This commit is contained in:
garbagemule 2013-08-16 17:52:32 +02:00
parent 22a8f43fce
commit 9c411a21ad
2 changed files with 4 additions and 4 deletions

View File

@ -1,7 +1,7 @@
name: MobArena
author: garbagemule
main: com.garbagemule.MobArena.MobArena
version: 0.95.5.22
version: 0.95.5.23
softdepend: [Multiverse-Core,Towny,Heroes,MagicSpells,Vault]
commands:
ma:

View File

@ -94,13 +94,13 @@ public enum Msg {
}
public String format(String s) {
return toString().replaceAll("%", s);
return toString().replace("%", s);
}
static void load(ConfigurationSection config) {
for (Msg msg : values()) {
// ARENA_END_GLOBAL => arena-end-global
String key = msg.name().toLowerCase().replaceAll("_","-");
String key = msg.name().toLowerCase().replace("_","-");
msg.set(config.getString(key, ""));
}
}
@ -109,7 +109,7 @@ public enum Msg {
YamlConfiguration yaml = new YamlConfiguration();
for (Msg msg : values()) {
// ARENA_END_GLOBAL => arena-end-global
String key = msg.name().replaceAll("_","-").toLowerCase();
String key = msg.name().replace("_","-").toLowerCase();
yaml.set(key, msg.value);
}
return yaml;