Skip to content

Commit

Permalink
Fix bStats 'vein mined materials' not tracking accurately
Browse files Browse the repository at this point in the history
  • Loading branch information
2008Choco committed Aug 5, 2023
1 parent 20adbc8 commit 22de608
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
import wtf.choco.veinminer.platform.PlatformPlayer;
import wtf.choco.veinminer.platform.world.BlockAccessor;
import wtf.choco.veinminer.platform.world.BlockState;
import wtf.choco.veinminer.platform.world.BlockType;
import wtf.choco.veinminer.tool.VeinMinerToolCategory;
import wtf.choco.veinminer.tool.VeinMinerToolCategoryHand;
import wtf.choco.veinminer.util.BlockPosition;
Expand Down Expand Up @@ -223,8 +224,9 @@ private void onBlockBreak(BlockBreakEvent event) {
}

// Break the block
BlockType blockType = BukkitAdapter.adaptBlock(block.getType());
if (block == origin || player.breakBlock(block)) {
StatTracker.accumulateVeinMinedMaterial(BukkitAdapter.adaptBlock(block.getType()));
StatTracker.accumulateVeinMinedMaterial(blockType);
}
}

Expand Down

0 comments on commit 22de608

Please sign in to comment.