summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKHobbits <rob@khobbits.co.uk>2012-08-31 17:57:57 +0100
committerKHobbits <rob@khobbits.co.uk>2012-08-31 17:57:57 +0100
commit6c58f6c482cde2ea6935a23823dfa5e1ef0918a0 (patch)
treef7f45dd81c469417db2775f3c7c170cd30475523
parentb87e38e24cbf80130fecfa16c57ebda33ca90b84 (diff)
downloadEssentials-6c58f6c482cde2ea6935a23823dfa5e1ef0918a0.tar
Essentials-6c58f6c482cde2ea6935a23823dfa5e1ef0918a0.tar.gz
Essentials-6c58f6c482cde2ea6935a23823dfa5e1ef0918a0.tar.lz
Essentials-6c58f6c482cde2ea6935a23823dfa5e1ef0918a0.tar.xz
Essentials-6c58f6c482cde2ea6935a23823dfa5e1ef0918a0.zip
Sanity Check.
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandrepair.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandrepair.java b/Essentials/src/com/earth2me/essentials/commands/Commandrepair.java
index 9cb3577ee..708e53586 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandrepair.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandrepair.java
@@ -28,7 +28,7 @@ public class Commandrepair extends EssentialsCommand
if (args[0].equalsIgnoreCase("hand"))
{
final ItemStack item = user.getItemInHand();
- if (item == null)
+ if (item == null || item.getType().isBlock() || item.getDurability() == 0)
{
throw new Exception(_("repairInvalidType"));
}