Only set detected durability if it's > 0

This commit is contained in:
TfT_02 2014-08-01 01:09:00 +02:00
parent a48ada306c
commit fb8592495d

View File

@ -329,7 +329,7 @@ public class McImportCommand implements CommandExecutor {
Material material = Material.matchMaterial(materialName); Material material = Material.matchMaterial(materialName);
short durability = (material == null) ? (short) 9999 : material.getMaxDurability(); short durability = (material == null) ? (short) 9999 : material.getMaxDurability();
skillContents.add(" " + " " + "Durability: " + durability); skillContents.add(" " + " " + "Durability: " + ((durability > 0) ? durability : (short) 9999));
} }
private HashMap<String, ArrayList<String>> getConfigSectionsUnknown(String modName, HashMap<String, ArrayList<String>> materialNames) { private HashMap<String, ArrayList<String>> getConfigSectionsUnknown(String modName, HashMap<String, ArrayList<String>> materialNames) {