Add missing UserManager check

Caused an java.lang.IndexOutOfBoundsException: Index: 0

Fixes #2335
This commit is contained in:
TfT_02 2014-10-25 17:29:50 +02:00
parent b3cd5486d6
commit 5d246d2701

View File

@ -52,6 +52,10 @@ public class TrackedTamingEntity extends BukkitRunnable {
CombatUtils.dealDamage(livingEntity, livingEntity.getMaxHealth(), DamageCause.SUICIDE, livingEntity); CombatUtils.dealDamage(livingEntity, livingEntity.getMaxHealth(), DamageCause.SUICIDE, livingEntity);
} }
if (!UserManager.hasPlayerDataKey(owner)) {
return;
}
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(owner); McMMOPlayer mcMMOPlayer = UserManager.getPlayer(owner);
TamingManager tamingManager = mcMMOPlayer.getTamingManager(); TamingManager tamingManager = mcMMOPlayer.getTamingManager();