SPIGOT-5921: Improve setNoDamageTicks for Players

This commit is contained in:
md_5 2020-07-02 11:18:03 +10:00
parent 53849f57f5
commit dc7c3c61fa
No known key found for this signature in database
GPG Key ID: E8E901AC7C617C11

View File

@ -1399,6 +1399,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
}
@Override
public void setNoDamageTicks(int ticks) {
super.setNoDamageTicks(ticks);
getHandle().invulnerableTicks = ticks; // SPIGOT-5921: Update both for players, like the getter above
}
@Override
public void setFlySpeed(float value) {
validateSpeed(value);