From 0a3ecbcd0effb8c2f047c8bf6c0d80d78ca910c1 Mon Sep 17 00:00:00 2001 From: ementalo Date: Mon, 18 Jun 2012 10:28:37 +0100 Subject: [PATCH] Use the assigned variable when looking at durability in itemdb --- .../src/com/earth2me/essentials/commands/Commanditemdb.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commanditemdb.java b/Essentials/src/com/earth2me/essentials/commands/Commanditemdb.java index a07c81e25..8a408924d 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commanditemdb.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commanditemdb.java @@ -39,7 +39,7 @@ public class Commanditemdb extends EssentialsCommand if (itemStack.getType() != Material.AIR) { int maxuses = itemStack.getType().getMaxDurability(); - int durability = ((itemStack.getType().getMaxDurability() + 1) - itemStack.getDurability()); + int durability = ((maxuses + 1) - itemStack.getDurability()); if (maxuses != 0) { sender.sendMessage(_("durability", Integer.toString(durability)));