mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2024-11-30 05:53:23 +01:00
Trying to fix "Item not recognised" message
This commit is contained in:
parent
a467e405c2
commit
92aeee4a86
@ -63,14 +63,14 @@ public class MaterialUtil {
|
||||
return material;
|
||||
}
|
||||
|
||||
name = name.toUpperCase().replace(" ", "_");
|
||||
name = name.replace(" ", "").toUpperCase();
|
||||
|
||||
short length = Short.MAX_VALUE;
|
||||
|
||||
for (Material currentMaterial : Material.values()) {
|
||||
String matName = currentMaterial.name();
|
||||
|
||||
if (matName.startsWith(name) && matName.length() < length) {
|
||||
if (matName.replace("_", "").startsWith(name) && matName.length() < length) {
|
||||
length = (short) matName.length();
|
||||
material = currentMaterial;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user