Factor invulnerableTicks into getNoDamageTicks. Fixes BUKKIT-1324

This commit is contained in:
feildmaster 2012-07-04 15:12:29 -05:00
parent d7272f42ef
commit dba9349ed4

View File

@ -850,4 +850,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
getHandle().abilities.canFly = value; getHandle().abilities.canFly = value;
getHandle().updateAbilities(); getHandle().updateAbilities();
} }
@Override
public int getNoDamageTicks() {
if (getHandle().invulnerableTicks > 0) {
return Math.max(getHandle().invulnerableTicks, getHandle().noDamageTicks);
} else {
return getHandle().noDamageTicks;
}
}
} }