From c612036db3f5ec821df09cc79d7610c93f09101b Mon Sep 17 00:00:00 2001 From: GJ Date: Mon, 28 Oct 2013 08:52:55 -0400 Subject: [PATCH] Don't try to find a treasure if there aren't any. Fixes #1572 --- .../com/gmail/nossr50/skills/fishing/FishingManager.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/com/gmail/nossr50/skills/fishing/FishingManager.java b/src/main/java/com/gmail/nossr50/skills/fishing/FishingManager.java index f490db7ca..93dc50831 100644 --- a/src/main/java/com/gmail/nossr50/skills/fishing/FishingManager.java +++ b/src/main/java/com/gmail/nossr50/skills/fishing/FishingManager.java @@ -454,6 +454,11 @@ public class FishingManager extends SkillManager { } List fishingTreasures = TreasureConfig.getInstance().fishingRewards.get(rarity); + + if (fishingTreasures.isEmpty()) { + return null; + } + treasure = fishingTreasures.get(Misc.getRandom().nextInt(fishingTreasures.size())); break; }