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

@@ -86,12 +86,10 @@ public class SheepShear implements Listener {
toolStats.logger.warning(newShears + " does NOT have any meta! Unable to update stats.");
return null;
}
Integer sheepSheared;
Integer sheepSheared = 0;
PersistentDataContainer container = meta.getPersistentDataContainer();
if (container.has(toolStats.shearsSheared, PersistentDataType.INTEGER)) {
sheepSheared = container.get(toolStats.shearsSheared, PersistentDataType.INTEGER);
} else {
sheepSheared = 0;
}
if (sheepSheared == null) {