mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-06 02:35:49 +01:00
Factor invulnerableTicks into getNoDamageTicks. Fixes BUKKIT-1324
This commit is contained in:
parent
d7272f42ef
commit
dba9349ed4
1 changed files with 9 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue