mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-12-25 01:58:28 +01:00
Fix ClassCastException with Taming. Fixes #924
This commit is contained in:
parent
802ad84613
commit
90d6fbde48
@ -18,6 +18,7 @@ Version 1.4.05-dev
|
||||
= Fixed Berserk misbehaving when /reload was used
|
||||
= Fixed parties misbehaving when /reload was used
|
||||
= Fixed Berserk getting "stuck" when /mcrefresh was used
|
||||
= Fix ClassCastException with Taming
|
||||
|
||||
Version 1.4.04
|
||||
+ Added functions to ExperienceAPI for use with offline players
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.gmail.nossr50.listeners;
|
||||
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.entity.AnimalTamer;
|
||||
import org.bukkit.entity.Entity;
|
||||
@ -106,7 +107,7 @@ public class EntityListener implements Listener {
|
||||
else if (attacker instanceof Tameable) {
|
||||
AnimalTamer animalTamer = ((Tameable) attacker).getOwner();
|
||||
|
||||
if (animalTamer != null) {
|
||||
if (animalTamer != null && ((OfflinePlayer) animalTamer).isOnline()) {
|
||||
attacker = (Entity) animalTamer;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user