mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-24 19:46:21 +01:00
Fixed NPE when players are killed by (for example) dispensers
This commit is contained in:
parent
a0216584b0
commit
e4d58faf5b
@ -0,0 +1,22 @@
|
|||||||
|
package net.minecraft.server;
|
||||||
|
|
||||||
|
public class EntityDamageSourceIndirect extends EntityDamageSource {
|
||||||
|
|
||||||
|
private Entity n;
|
||||||
|
|
||||||
|
public EntityDamageSourceIndirect(String s, Entity entity, Entity entity1) {
|
||||||
|
super(s, entity);
|
||||||
|
this.n = entity1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Entity getEntity() {
|
||||||
|
return this.n;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String a(EntityHuman entityhuman) {
|
||||||
|
// CraftBukkit start
|
||||||
|
String source = (this.n == null) ? "Herobrine" : this.n.Y();
|
||||||
|
return StatisticCollector.a("death." + this.m, new Object[] { entityhuman.name, source});
|
||||||
|
// CraftBukkit end
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user