mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-23 00:42:05 +01:00
Implemented getKiller in LivingEntity
By: Nathan Adams <dinnerbone@dinnerbone.com>
This commit is contained in:
parent
a163a97e1c
commit
dd1048102f
1 changed files with 6 additions and 0 deletions
|
@ -15,6 +15,7 @@ import org.bukkit.block.Block;
|
|||
import org.bukkit.entity.Arrow;
|
||||
import org.bukkit.entity.Egg;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.entity.Snowball;
|
||||
import org.bukkit.entity.Vehicle;
|
||||
import org.bukkit.util.BlockIterator;
|
||||
|
@ -24,6 +25,7 @@ import java.util.HashSet;
|
|||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import net.minecraft.server.DamageSource;
|
||||
import net.minecraft.server.EntityHuman;
|
||||
import org.bukkit.entity.HumanEntity;
|
||||
|
||||
public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
|
@ -223,4 +225,8 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
|||
public String toString() {
|
||||
return "CraftLivingEntity{" + "id=" + getEntityId() + '}';
|
||||
}
|
||||
|
||||
public Player getKiller() {
|
||||
return getHandle().aF == null ? null : (Player)getHandle().aF.getBukkitEntity();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue