mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-01-19 00:45:27 +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 Berserk misbehaving when /reload was used
|
||||||
= Fixed parties misbehaving when /reload was used
|
= Fixed parties misbehaving when /reload was used
|
||||||
= Fixed Berserk getting "stuck" when /mcrefresh was used
|
= Fixed Berserk getting "stuck" when /mcrefresh was used
|
||||||
|
= Fix ClassCastException with Taming
|
||||||
|
|
||||||
Version 1.4.04
|
Version 1.4.04
|
||||||
+ Added functions to ExperienceAPI for use with offline players
|
+ Added functions to ExperienceAPI for use with offline players
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package com.gmail.nossr50.listeners;
|
package com.gmail.nossr50.listeners;
|
||||||
|
|
||||||
|
import org.bukkit.OfflinePlayer;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.entity.AnimalTamer;
|
import org.bukkit.entity.AnimalTamer;
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
@ -106,7 +107,7 @@ public class EntityListener implements Listener {
|
|||||||
else if (attacker instanceof Tameable) {
|
else if (attacker instanceof Tameable) {
|
||||||
AnimalTamer animalTamer = ((Tameable) attacker).getOwner();
|
AnimalTamer animalTamer = ((Tameable) attacker).getOwner();
|
||||||
|
|
||||||
if (animalTamer != null) {
|
if (animalTamer != null && ((OfflinePlayer) animalTamer).isOnline()) {
|
||||||
attacker = (Entity) animalTamer;
|
attacker = (Entity) animalTamer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user