Skip to content

Commit c597b4f

Browse files
committed
make sure to do this for hoes
1 parent a3f3e05 commit c597b4f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/main/java/lol/hyper/toolstats/events/BlockBreak.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,13 @@ public void onBreak(BlockBreakEvent event) {
7878
// replace item in main hand
7979
heldItem.setItemMeta(newMeta);
8080
}
81+
} else {
82+
// item is a hoe, but not breaking crops
83+
ItemMeta newMeta = toolStats.itemLore.updateBlocksMined(heldItem, 1);
84+
if (newMeta != null) {
85+
// replace item in main hand
86+
heldItem.setItemMeta(newMeta);
87+
}
8188
}
8289
} else {
8390
// item is not a hoe

0 commit comments

Comments
 (0)