mirror of
https://gitlab.com/phoenix-dvpmt/mmocore.git
synced 2024-11-28 00:55:29 +01:00
Clicking an empty anvil result slot no longer errors
This commit is contained in:
parent
a4477415ed
commit
6888630355
@ -60,6 +60,7 @@ public class RepairItemExperienceSource extends ExperienceSource<ItemStack> {
|
|||||||
* before getting the amount of durability repaired
|
* before getting the amount of durability repaired
|
||||||
*/
|
*/
|
||||||
ItemStack old = event.getInventory().getItem(0);
|
ItemStack old = event.getInventory().getItem(0);
|
||||||
|
if (old == null || old.getType() == Material.AIR) return;
|
||||||
if (old.getType().getMaxDurability() < 30 || item.getType().getMaxDurability() < 10)
|
if (old.getType().getMaxDurability() < 30 || item.getType().getMaxDurability() < 10)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user