geforkt von Mirrors/Paper
LivingEntity#setKiller
== AT == public net.minecraft.world.entity.LivingEntity lastHurtByPlayerTime
Dieser Commit ist enthalten in:
Ursprung
0dcb203960
Commit
c2f10d08a9
@ -417,6 +417,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
return this.getHandle().lastHurtByPlayer == null ? null : (Player) this.getHandle().lastHurtByPlayer.getBukkitEntity();
|
||||
}
|
||||
|
||||
// Paper start
|
||||
@Override
|
||||
public void setKiller(Player killer) {
|
||||
net.minecraft.server.level.ServerPlayer entityPlayer = killer == null ? null : ((CraftPlayer) killer).getHandle();
|
||||
getHandle().lastHurtByPlayer = entityPlayer;
|
||||
getHandle().lastHurtByMob = entityPlayer;
|
||||
getHandle().lastHurtByPlayerTime = entityPlayer == null ? 0 : 100; // 100 value taken from EntityLiving#damageEntity
|
||||
}
|
||||
// Paper end
|
||||
|
||||
@Override
|
||||
public boolean addPotionEffect(PotionEffect effect) {
|
||||
return this.addPotionEffect(effect, false);
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren