Add remaining missing setLastDamageCause's
Dieser Commit ist enthalten in:
Ursprung
79189c1c13
Commit
8b9aad8c2b
@ -804,6 +804,7 @@ public abstract class Entity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
i = event.getDamage();
|
i = event.getDamage();
|
||||||
|
event.getEntity().setLastDamageCause(event);
|
||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
this.damageEntity(DamageSource.FIRE, i);
|
this.damageEntity(DamageSource.FIRE, i);
|
||||||
@ -1449,6 +1450,7 @@ public abstract class Entity {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
thisBukkitEntity.setLastDamageCause(event);
|
||||||
this.burn(event.getDamage());
|
this.burn(event.getDamage());
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
|
@ -402,6 +402,7 @@ public class EntityEnderDragon extends EntityComplex {
|
|||||||
Bukkit.getPluginManager().callEvent(damageEvent);
|
Bukkit.getPluginManager().callEvent(damageEvent);
|
||||||
|
|
||||||
if (!damageEvent.isCancelled()) {
|
if (!damageEvent.isCancelled()) {
|
||||||
|
entity.getBukkitEntity().setLastDamageCause(damageEvent);
|
||||||
entity.damageEntity(DamageSource.mobAttack(this), damageEvent.getDamage());
|
entity.damageEntity(DamageSource.mobAttack(this), damageEvent.getDamage());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -67,6 +67,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.
|
||||||
|
bPlayer.setLastDamageCause(damageEvent);
|
||||||
((CraftPlayer) bPlayer).getHandle().damageEntity(DamageSource.FALL, damageEvent.getDamage()); // Damage the new player instead of the old
|
((CraftPlayer) bPlayer).getHandle().damageEntity(DamageSource.FALL, damageEvent.getDamage()); // Damage the new player instead of the old
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -137,9 +137,7 @@ public class Explosion {
|
|||||||
|
|
||||||
if (damagee == null) {
|
if (damagee == null) {
|
||||||
// nothing was hurt
|
// nothing was hurt
|
||||||
} else if (this.source == null) { // Block explosion
|
} else if (this.source == null) { // Block explosion (without an entity source; bed etc.)
|
||||||
// TODO: get the x/y/z of the tnt block?
|
|
||||||
// does this even get called ever? @see EntityTNTPrimed - not BlockTNT or whatever
|
|
||||||
EntityDamageByBlockEvent event = new EntityDamageByBlockEvent(null, damagee, EntityDamageEvent.DamageCause.BLOCK_EXPLOSION, damageDone);
|
EntityDamageByBlockEvent event = new EntityDamageByBlockEvent(null, damagee, EntityDamageEvent.DamageCause.BLOCK_EXPLOSION, damageDone);
|
||||||
Bukkit.getPluginManager().callEvent(event);
|
Bukkit.getPluginManager().callEvent(event);
|
||||||
|
|
||||||
@ -162,6 +160,7 @@ public class Explosion {
|
|||||||
Bukkit.getPluginManager().callEvent(event);
|
Bukkit.getPluginManager().callEvent(event);
|
||||||
|
|
||||||
if (!event.isCancelled()) {
|
if (!event.isCancelled()) {
|
||||||
|
entity.getBukkitEntity().setLastDamageCause(event);
|
||||||
entity.damageEntity(DamageSource.EXPLOSION, event.getDamage());
|
entity.damageEntity(DamageSource.EXPLOSION, event.getDamage());
|
||||||
|
|
||||||
entity.motX += d0 * d10;
|
entity.motX += d0 * d10;
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren