From 548ff296899c2b13f9e04bc3460a4aff69b7cda9 Mon Sep 17 00:00:00 2001 From: Blake Bartenbach Date: Sat, 21 Jul 2012 06:46:50 -0500 Subject: [PATCH] Fix for ClassCastException --- src/main/java/com/gmail/nossr50/skills/gathering/Fishing.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/com/gmail/nossr50/skills/gathering/Fishing.java b/src/main/java/com/gmail/nossr50/skills/gathering/Fishing.java index 2974b05b3..5d05af19c 100644 --- a/src/main/java/com/gmail/nossr50/skills/gathering/Fishing.java +++ b/src/main/java/com/gmail/nossr50/skills/gathering/Fishing.java @@ -191,6 +191,10 @@ public class Fishing { * @param event The event to modify */ public static void shakeMob(PlayerFishEvent event) { + if (!(event.getCaught() instanceof LivingEntity)) { + return; + } + int randomChance = 100; if (event.getPlayer().hasPermission("mcmmo.perks.lucky.fishing")) {