mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-24 18:07:39 +01:00
Factor invulnerableTicks into getNoDamageTicks. Fixes BUKKIT-1324
This commit is contained in:
parent
d7272f42ef
commit
dba9349ed4
@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user