BUILDTOOLS-251: Make much of Bukkit locale independent

By: md_5 <git@md-5.net>
This commit is contained in:
Bukkit/Spigot
2016-06-26 19:31:59 +10:00
parent b54985de63
commit 7f7f1608e8
17 changed files with 41 additions and 41 deletions

View File

@@ -707,7 +707,7 @@ public enum Material {
} catch (NumberFormatException ex) {}
if (result == null) {
String filtered = name.toUpperCase();
String filtered = name.toUpperCase(java.util.Locale.ENGLISH);
filtered = filtered.replaceAll("\\s+", "_").replaceAll("\\W", "");
result = BY_NAME.get(filtered);