Factor invulnerableTicks into getNoDamageTicks. Fixes BUKKIT-1324

By: feildmaster <admin@feildmaster.com>
This commit is contained in:
CraftBukkit/Spigot 2012-07-04 15:12:29 -05:00
parent a8eaf02d50
commit b69d15792e

View file

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