From fb8592495d54013325bf73a1bee771ec242d9315 Mon Sep 17 00:00:00 2001 From: TfT_02 Date: Fri, 1 Aug 2014 01:09:00 +0200 Subject: [PATCH] Only set detected durability if it's > 0 --- src/main/java/com/gmail/nossr50/commands/McImportCommand.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/gmail/nossr50/commands/McImportCommand.java b/src/main/java/com/gmail/nossr50/commands/McImportCommand.java index 7cd13b87a..a372dca0d 100644 --- a/src/main/java/com/gmail/nossr50/commands/McImportCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/McImportCommand.java @@ -329,7 +329,7 @@ public class McImportCommand implements CommandExecutor { Material material = Material.matchMaterial(materialName); short durability = (material == null) ? (short) 9999 : material.getMaxDurability(); - skillContents.add(" " + " " + "Durability: " + durability); + skillContents.add(" " + " " + "Durability: " + ((durability > 0) ? durability : (short) 9999)); } private HashMap> getConfigSectionsUnknown(String modName, HashMap> materialNames) {