mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2025-02-04 04:21:19 +01:00
Hopefully this should increase performance a bit
This method is a bottleneck :(
This commit is contained in:
parent
79bf52c312
commit
ffbaaf85ed
@ -70,7 +70,7 @@ public class MaterialUtil {
|
||||
for (Material currentMaterial : Material.values()) {
|
||||
String matName = currentMaterial.name();
|
||||
|
||||
if (matName.replace("_", "").startsWith(name) && matName.length() < length) {
|
||||
if (matName.length() < length && matName.replace("_", "").startsWith(name)) {
|
||||
length = (short) matName.length();
|
||||
material = currentMaterial;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user