mirror of
https://github.com/PaperMC/Paper.git
synced 2025-03-13 11:18:23 +01:00
[Bleeding] Use event values for damage.
This commit is contained in:
parent
fa6fd24f2a
commit
80bae060c6
2 changed files with 3 additions and 3 deletions
|
@ -61,7 +61,7 @@ public class EntityEnderPearl extends EntityProjectile {
|
|||
if (!damageEvent.isCancelled()) {
|
||||
org.bukkit.entity.Player bPlayer = Bukkit.getPlayerExact(((EntityPlayer) this.shooter).name);
|
||||
((CraftPlayer) bPlayer).getHandle().invulnerableTicks = -1; // Remove spawning invulnerability.
|
||||
((CraftPlayer) bPlayer).getHandle().damageEntity(DamageSource.FALL, 5); // Damage the new player instead of the old
|
||||
((CraftPlayer) bPlayer).getHandle().damageEntity(DamageSource.FALL, damageEvent.getDamage()); // Damage the new player instead of the old
|
||||
}
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
|
|
@ -347,9 +347,9 @@ public class EntityWolf extends EntityAnimal {
|
|||
if (event.isCancelled()) {
|
||||
return;
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
entity.damageEntity(DamageSource.mobAttack(this), b0);
|
||||
entity.damageEntity(DamageSource.mobAttack(this), event.getDamage());
|
||||
// CraftBukkit end
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue