mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 23:26:45 +01:00
Fixed possible ClassCastException from catching something other than a
mob when using the Shake Mob skill
This commit is contained in:
parent
ac1c420cb5
commit
ca9ce1ba1b
@ -29,6 +29,7 @@ Version 1.3.10-dev
|
|||||||
= Fixed "lower tool" messages still being displayed even when ability messages are disabled.
|
= 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 blocks not dropping the proper item with Super Breaker when Silk Touch is used
|
||||||
= Fixed custom woodcutting blocks throwing errors.
|
= 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
|
! Changed the format by which Chunklets are stored to be much smaller, and much faster to load
|
||||||
! Optimized how player placed blocks are tracked
|
! Optimized how player placed blocks are tracked
|
||||||
|
|
||||||
|
@ -3,6 +3,7 @@ package com.gmail.nossr50.listeners;
|
|||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
|
import org.bukkit.entity.LivingEntity;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.EventPriority;
|
import org.bukkit.event.EventPriority;
|
||||||
@ -96,6 +97,10 @@ public class PlayerListener implements Listener {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case CAUGHT_ENTITY:
|
case CAUGHT_ENTITY:
|
||||||
|
if (!(event.getCaught() instanceof LivingEntity)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (Users.getProfile(player).getSkillLevel(SkillType.FISHING) >= 150 && Permissions.getInstance().shakeMob(player)) {
|
if (Users.getProfile(player).getSkillLevel(SkillType.FISHING) >= 150 && Permissions.getInstance().shakeMob(player)) {
|
||||||
Fishing.shakeMob(event);
|
Fishing.shakeMob(event);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user