Implemented getKiller in LivingEntity
Dieser Commit ist enthalten in:
Ursprung
1fc8092ea6
Commit
b2af70e5c7
@ -56,7 +56,7 @@ public abstract class EntityLiving extends Entity {
|
||||
public float aC;
|
||||
public float aD;
|
||||
public float aE;
|
||||
protected EntityHuman aF = null;
|
||||
public EntityHuman aF = null; // CraftBukkit - prot to pub - "killer"
|
||||
protected int aG = 0;
|
||||
public int aH = 0;
|
||||
public int aI = 0;
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren