BUILDTOOLS-251: Make much of Bukkit locale independent
By: md_5 <git@md-5.net>
This commit is contained in:
@ -99,13 +99,13 @@ public enum Art {
|
||||
public static Art getByName(String name) {
|
||||
Validate.notNull(name, "Name cannot be null");
|
||||
|
||||
return BY_NAME.get(name.toLowerCase().replaceAll("_", ""));
|
||||
return BY_NAME.get(name.toLowerCase(java.util.Locale.ENGLISH).replaceAll("_", ""));
|
||||
}
|
||||
|
||||
static {
|
||||
for (Art art : values()) {
|
||||
BY_ID.put(art.id, art);
|
||||
BY_NAME.put(art.toString().toLowerCase().replaceAll("_", ""), art);
|
||||
BY_NAME.put(art.toString().toLowerCase(java.util.Locale.ENGLISH).replaceAll("_", ""), art);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user