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

Added get/setLastDamageCause. Thanks sunkid!

Dieser Commit ist enthalten in:
EvilSeph 2011-05-16 00:26:22 -04:00
Ursprung 8de2b52a02
Commit 7f73594aa8

Datei anzeigen

@ -7,6 +7,7 @@ import org.bukkit.Server;
import org.bukkit.World;
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.craftbukkit.CraftWorld;
import org.bukkit.event.entity.EntityDamageEvent;
import org.bukkit.util.Vector;
import java.util.List;
@ -14,6 +15,7 @@ import java.util.List;
public abstract class CraftEntity implements org.bukkit.entity.Entity {
protected final CraftServer server;
protected Entity entity;
private EntityDamageEvent lastDamageEvent;
public CraftEntity(final CraftServer server, final Entity entity) {
this.server = server;
@ -254,4 +256,12 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
public void setFallDistance(float distance) {
getHandle().fallDistance = distance;
}
public void setLastDamageCause(EntityDamageEvent event) {
lastDamageEvent = event;
}
public EntityDamageEvent getLastDamageCause() {
return lastDamageEvent;
}
}