From 5d246d2701233604d9b7c4d386dc7e05ecb9831b Mon Sep 17 00:00:00 2001 From: TfT_02 Date: Sat, 25 Oct 2014 17:29:50 +0200 Subject: [PATCH] Add missing UserManager check Caused an java.lang.IndexOutOfBoundsException: Index: 0 Fixes #2335 --- .../com/gmail/nossr50/skills/taming/TrackedTamingEntity.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/com/gmail/nossr50/skills/taming/TrackedTamingEntity.java b/src/main/java/com/gmail/nossr50/skills/taming/TrackedTamingEntity.java index a54e637c3..d818da739 100644 --- a/src/main/java/com/gmail/nossr50/skills/taming/TrackedTamingEntity.java +++ b/src/main/java/com/gmail/nossr50/skills/taming/TrackedTamingEntity.java @@ -52,6 +52,10 @@ public class TrackedTamingEntity extends BukkitRunnable { CombatUtils.dealDamage(livingEntity, livingEntity.getMaxHealth(), DamageCause.SUICIDE, livingEntity); } + if (!UserManager.hasPlayerDataKey(owner)) { + return; + } + McMMOPlayer mcMMOPlayer = UserManager.getPlayer(owner); TamingManager tamingManager = mcMMOPlayer.getTamingManager();