1
0
mirror of https://github.com/mcMMO-Dev/mcMMO.git synced 2026-02-18 01:42:32 +01:00

Don't try to find a treasure if there aren't any.

Fixes #1572
This commit is contained in:
GJ
2013-10-28 08:52:55 -04:00
parent ad4ee6f402
commit c612036db3

View File

@@ -454,6 +454,11 @@ public class FishingManager extends SkillManager {
}
List<FishingTreasure> fishingTreasures = TreasureConfig.getInstance().fishingRewards.get(rarity);
if (fishingTreasures.isEmpty()) {
return null;
}
treasure = fishingTreasures.get(Misc.getRandom().nextInt(fishingTreasures.size()));
break;
}