3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-20 21:40:06 +01:00

[Bleeding] Use event values for damage.

Dieser Commit ist enthalten in:
Feildmaster 2012-02-09 17:18:50 -06:00 committet von EvilSeph
Ursprung fa6fd24f2a
Commit 80bae060c6
2 geänderte Dateien mit 3 neuen und 3 gelöschten Zeilen

Datei anzeigen

@ -61,7 +61,7 @@ public class EntityEnderPearl extends EntityProjectile {
if (!damageEvent.isCancelled()) { if (!damageEvent.isCancelled()) {
org.bukkit.entity.Player bPlayer = Bukkit.getPlayerExact(((EntityPlayer) this.shooter).name); org.bukkit.entity.Player bPlayer = Bukkit.getPlayerExact(((EntityPlayer) this.shooter).name);
((CraftPlayer) bPlayer).getHandle().invulnerableTicks = -1; // Remove spawning invulnerability. ((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 // CraftBukkit end

Datei anzeigen

@ -347,9 +347,9 @@ public class EntityWolf extends EntityAnimal {
if (event.isCancelled()) { if (event.isCancelled()) {
return; return;
} }
// CraftBukkit end
entity.damageEntity(DamageSource.mobAttack(this), b0); entity.damageEntity(DamageSource.mobAttack(this), event.getDamage());
// CraftBukkit end
} }
} }