Exempt players in creative/spectator from nether ceiling damage (#8427)

This commit is contained in:
Warrior 2022-10-07 20:43:26 +02:00
parent 9e43d68e57
commit 3ef916da77

View file

@ -16,7 +16,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ // Paper start - Configurable nether ceiling damage
+ if (this.getY() < (double) (this.level.getMinBuildHeight() - 64) || (this.level.getWorld().getEnvironment() == org.bukkit.World.Environment.NETHER
+ && level.paperConfig().environment.netherCeilingVoidDamageHeight > 0
+ && this.getY() >= this.level.paperConfig().environment.netherCeilingVoidDamageHeight)) {
+ && this.getY() >= this.level.paperConfig().environment.netherCeilingVoidDamageHeight
+ && (!(this instanceof Player player) || !player.getAbilities().invulnerable))) {
+ // Paper end
this.outOfWorld();
}