}
public ModelItem getItem(String itemName) {
if (itemName != null && modelRepository != null) {
for (String modelName : modelRepository.getAllModelNamesOfType("items")) {
ItemModel model = (ItemModel) modelRepository.getModel(modelName);
for (ModelItem item : model.getItems()) {
if (itemName.equals(item.getName()))
return item;
}
}
}