mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2024-11-24 02:56:02 +01:00
We need Regex in that replace!
This commit is contained in:
parent
6f5ecdc0ce
commit
5264f5d2df
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user