mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-04 13:47:53 +02:00
Fixing repair to not repair items with datavalues, unless they actually have a durability.
This commit is contained in:
@@ -80,7 +80,7 @@ public class Commandrepair extends EssentialsCommand
|
|||||||
private void repairItem(final ItemStack item) throws Exception
|
private void repairItem(final ItemStack item) throws Exception
|
||||||
{
|
{
|
||||||
final Material material = Material.getMaterial(item.getTypeId());
|
final Material material = Material.getMaterial(item.getTypeId());
|
||||||
if (material.isBlock() || material.getMaxDurability() < 0)
|
if (material.isBlock() || material.getMaxDurability() < 1)
|
||||||
{
|
{
|
||||||
throw new Exception(_("repairInvalidType"));
|
throw new Exception(_("repairInvalidType"));
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user