mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-24 01:06:01 +01:00
Factor invulnerableTicks into getNoDamageTicks. Fixes BUKKIT-1324
By: feildmaster <admin@feildmaster.com>
This commit is contained in:
parent
a8eaf02d50
commit
b69d15792e
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…
Add table
Reference in a new issue