summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorementalo <ementalodev@gmx.co.uk>2012-06-18 10:28:37 +0100
committerementalo <ementalodev@gmx.co.uk>2012-06-18 10:28:37 +0100
commit0a3ecbcd0effb8c2f047c8bf6c0d80d78ca910c1 (patch)
tree602afac51e9f5fb7a859de4c12025e64b0f7e593
parent9679a90d88b240c1f29670389406e12301b64a9a (diff)
downloadEssentials-0a3ecbcd0effb8c2f047c8bf6c0d80d78ca910c1.tar
Essentials-0a3ecbcd0effb8c2f047c8bf6c0d80d78ca910c1.tar.gz
Essentials-0a3ecbcd0effb8c2f047c8bf6c0d80d78ca910c1.tar.lz
Essentials-0a3ecbcd0effb8c2f047c8bf6c0d80d78ca910c1.tar.xz
Essentials-0a3ecbcd0effb8c2f047c8bf6c0d80d78ca910c1.zip
Use the assigned variable when looking at durability in itemdb
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commanditemdb.java2
1 files changed, 1 insertions, 1 deletions
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)));