Sanity Check.

This commit is contained in:
KHobbits 2012-08-31 17:57:57 +01:00
parent e89f1d8a03
commit 4015351c85

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