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

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