diff --git a/Changelog.txt b/Changelog.txt index 5bfcf75ef..c72661c0c 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -29,6 +29,7 @@ Version 1.3.10-dev = Fixed "lower tool" messages still being displayed even when ability messages are disabled. = Fixed custom blocks not dropping the proper item with Super Breaker when Silk Touch is used = Fixed custom woodcutting blocks throwing errors. + = Fixed possible ClassCastException from catching something other than a mob when using the Shake Mob skill ! Changed the format by which Chunklets are stored to be much smaller, and much faster to load ! Optimized how player placed blocks are tracked diff --git a/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java b/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java index 4e96dcdcb..3b3a3a691 100644 --- a/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java @@ -3,6 +3,7 @@ package com.gmail.nossr50.listeners; import org.bukkit.ChatColor; import org.bukkit.Material; import org.bukkit.block.Block; +import org.bukkit.entity.LivingEntity; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; @@ -96,6 +97,10 @@ public class PlayerListener implements Listener { break; case CAUGHT_ENTITY: + if (!(event.getCaught() instanceof LivingEntity)) { + return; + } + if (Users.getProfile(player).getSkillLevel(SkillType.FISHING) >= 150 && Permissions.getInstance().shakeMob(player)) { Fishing.shakeMob(event); }