Fixed giving another player a relic ring crashing their client. Closes #1289

This commit is contained in:
Lizbeth Rika committed 2015-08-21 21:28:54 +01:00
1 parent cc428a73cb
commit 9d9ce34bad
1 file changed
+1 -1
@@ -101,7 +101,7 @@ public class ItemRelic extends ItemMod implements IRelic {
soulbind = getSoulbindUsernameS(stack);
}
if(!isRightPlayer(player, stack) && player.ticksExisted % 10 == 0 && ((ItemRelic) stack.getItem()).shouldDamageWrongPlayer())
if(!isRightPlayer(player, stack) && player.ticksExisted % 10 == 0 && (!(stack.getItem() instanceof ItemRelic) || ((ItemRelic) stack.getItem()).shouldDamageWrongPlayer()))
player.attackEntityFrom(damageSource(), 2);
}