1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-09-02 19:22:37 +02:00

Sanity Check.

This commit is contained in:
KHobbits
2012-08-31 17:57:57 +01:00
parent b87e38e24c
commit 6c58f6c482

View File

@@ -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"));
}