mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-04 22:14:40 +01:00
Added get/setLastDamageCause. Thanks sunkid!
This commit is contained in:
parent
8de2b52a02
commit
7f73594aa8
1 changed files with 10 additions and 0 deletions
|
@ -7,6 +7,7 @@ import org.bukkit.Server;
|
||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
import org.bukkit.craftbukkit.CraftServer;
|
import org.bukkit.craftbukkit.CraftServer;
|
||||||
import org.bukkit.craftbukkit.CraftWorld;
|
import org.bukkit.craftbukkit.CraftWorld;
|
||||||
|
import org.bukkit.event.entity.EntityDamageEvent;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -14,6 +15,7 @@ import java.util.List;
|
||||||
public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||||
protected final CraftServer server;
|
protected final CraftServer server;
|
||||||
protected Entity entity;
|
protected Entity entity;
|
||||||
|
private EntityDamageEvent lastDamageEvent;
|
||||||
|
|
||||||
public CraftEntity(final CraftServer server, final Entity entity) {
|
public CraftEntity(final CraftServer server, final Entity entity) {
|
||||||
this.server = server;
|
this.server = server;
|
||||||
|
@ -254,4 +256,12 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||||
public void setFallDistance(float distance) {
|
public void setFallDistance(float distance) {
|
||||||
getHandle().fallDistance = distance;
|
getHandle().fallDistance = distance;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setLastDamageCause(EntityDamageEvent event) {
|
||||||
|
lastDamageEvent = event;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EntityDamageEvent getLastDamageCause() {
|
||||||
|
return lastDamageEvent;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue