Fixing repair to not repair items with datavalues, unless they actually have a durability.

This commit is contained in:
KHobbits 2012-02-02 10:27:35 +00:00
parent 492c4e8521
commit 3ff1f4adbb

View File

@ -80,7 +80,7 @@ public class Commandrepair extends EssentialsCommand
private void repairItem(final ItemStack item) throws Exception
{
final Material material = Material.getMaterial(item.getTypeId());
if (material.isBlock() || material.getMaxDurability() < 0)
if (material.isBlock() || material.getMaxDurability() < 1)
{
throw new Exception(_("repairInvalidType"));
}