3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-12-26 02:50:06 +01:00

Revert a breaking change to fuzzy item/block lookup.

Dieser Commit ist enthalten in:
wizjany 2014-04-26 00:21:05 -04:00
Ursprung 5ed9239e14
Commit b0a52a4cf7

Datei anzeigen

@ -289,7 +289,7 @@ public final class StringUtil {
return null;
}
int minDist = Integer.MAX_VALUE;
int minDist = -1;
for (Map.Entry<String, T> entry : lookup.entrySet()) {
final String key = entry.getKey();
@ -299,16 +299,12 @@ public final class StringUtil {
int dist = getLevenshteinDistance(key, testName);
if (dist >= minDist) {
if ((dist < minDist || minDist == -1) && dist < 2) {
minDist = dist;
type = entry.getValue();
}
}
if (minDist > 1) {
return null;
}
return type;
}
}