Fixed possible ClassCastException from catching something other than a

mob when using the Shake Mob skill
This commit is contained in:
GJ 2012-07-21 09:37:17 -04:00
parent ac1c420cb5
commit ca9ce1ba1b
2 changed files with 6 additions and 0 deletions

View File

@ -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

View File

@ -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);
}