fix deepsource problems

This commit is contained in:
hyperdefined
2022-10-13 18:09:19 -04:00
parent bea7e52347
commit 24d30f6059
5 changed files with 8 additions and 19 deletions

View File

@@ -74,12 +74,10 @@ public class BlocksMined implements Listener {
}
// read the current stats from the item
// if they don't exist, then start from 0
Integer blocksMined;
Integer blocksMined = 0;
PersistentDataContainer container = meta.getPersistentDataContainer();
if (container.has(toolStats.genericMined, PersistentDataType.INTEGER)) {
blocksMined = container.get(toolStats.genericMined, PersistentDataType.INTEGER);
} else {
blocksMined = 0;
}
if (blocksMined == null) {