1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-26 16:04:27 +02:00

Sanity Check.

This commit is contained in:
KHobbits
2012-08-31 17:57:57 +01:00
parent 07906c9bbf
commit d8cabedb59

View File

@@ -28,7 +28,7 @@ public class Commandrepair extends EssentialsCommand
if (args[0].equalsIgnoreCase("hand")) if (args[0].equalsIgnoreCase("hand"))
{ {
final ItemStack item = user.getItemInHand(); final ItemStack item = user.getItemInHand();
if (item == null) if (item == null || item.getType().isBlock() || item.getDurability() == 0)
{ {
throw new Exception(_("repairInvalidType")); throw new Exception(_("repairInvalidType"));
} }