mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-14 13:13:24 +00:00
Fixing repair to not repair items with datavalues, unless they actually have a durability.
This commit is contained in:
parent
492c4e8521
commit
3ff1f4adbb
1 changed files with 1 additions and 1 deletions
|
@ -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"));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue