A minor addition to isRepairable
This commit is contained in:
parent
4f0ff53de8
commit
5f9233bc3b
@ -278,6 +278,10 @@ public class InventoryUtil
|
|||||||
// However we add this in anyways for future compatibility.
|
// However we add this in anyways for future compatibility.
|
||||||
if ( ! material.getData().equals(MaterialData.class)) return false;
|
if ( ! material.getData().equals(MaterialData.class)) return false;
|
||||||
|
|
||||||
|
// We may also not repair things that can not take any damage.
|
||||||
|
// NOTE: MaxDurability should be renamed to MaxDamage.
|
||||||
|
if (material.getMaxDurability() == 0) return false;
|
||||||
|
|
||||||
// Otherwise repairable
|
// Otherwise repairable
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user