int id = 0;
if (parts.length == 2) {
try {
id = Integer.valueOf(parts[1]);
} catch (NumberFormatException e) {
GiveAliasList alias = player.getServer().giveAliasList;
Item itemAlias = alias.getItemId(parts[1]);
if (itemAlias == null) {
Suggestion correctName = alias.findWithLevenshtein(parts[1]);
if (correctName.distance < 4) {
id = alias.getItemId(correctName.name).id;
}
} else {
id = itemAlias.id;
}
}