Add Hunger Config Values

By: lazertester <austin.techhead@gmail.com>
This commit is contained in:
CraftBukkit/Spigot
2014-08-17 19:56:17 +10:00
parent 83699d54bf
commit f026f7905e
4 changed files with 36 additions and 10 deletions

View File

@@ -300,7 +300,7 @@
}
- this.causeFoodExhaustion(0.1F);
+ this.causeFoodExhaustion(0.1F, EntityExhaustionEvent.ExhaustionReason.ATTACK); // CraftBukkit - EntityExhaustionEvent
+ this.causeFoodExhaustion(this.level().spigotConfig.combatExhaustion, EntityExhaustionEvent.ExhaustionReason.ATTACK); // CraftBukkit - EntityExhaustionEvent // Spigot - Change to use configurable value
} else {
this.level().playSound((Player) null, this.getX(), this.getY(), this.getZ(), SoundEvents.PLAYER_ATTACK_NODAMAGE, this.getSoundSource(), 1.0F, 1.0F);
+ // CraftBukkit start - resync on cancelled event