We need Regex in that replace!

This commit is contained in:
Acrobot 2013-02-11 20:51:54 +01:00
parent 6f5ecdc0ce
commit 5264f5d2df

View File

@ -59,7 +59,7 @@ public class MaterialUtil {
* @return Material found * @return Material found
*/ */
public static Material getMaterial(String name) { public static Material getMaterial(String name) {
String formatted = name.replace(" |_", "").toUpperCase(); String formatted = name.replaceAll(" |_", "").toUpperCase();
if (MATERIAL_CACHE.containsKey(formatted)) { if (MATERIAL_CACHE.containsKey(formatted)) {
return MATERIAL_CACHE.get(formatted); return MATERIAL_CACHE.get(formatted);