From 4015351c854c692d5d1b234f1eb6d8f7ce1c4f29 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Fri, 31 Aug 2012 17:57:57 +0100 Subject: [PATCH] Sanity Check. --- .../src/com/earth2me/essentials/commands/Commandrepair.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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")); }