summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft/server/EntityDamageSourceIndirect.java
blob: 9222a1bbb6642ab2c38e73bb5c735f2b470580cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package net.minecraft.server;

public class EntityDamageSourceIndirect extends EntityDamageSource {

    private Entity owner;

    public EntityDamageSourceIndirect(String s, Entity entity, Entity entity1) {
        super(s, entity);
        this.owner = entity1;
    }

    public Entity f() {
        return this.o;
    }

    public Entity getEntity() {
        return this.owner;
    }

    public String getLocalizedDeathMessage(EntityHuman entityhuman) {
        // CraftBukkit start
        String source = (this.owner == null) ? "Herobrine" : this.owner.getLocalizedName();
        return LocaleI18n.get("death." + this.translationIndex, new Object[] { entityhuman.name, source});
    }

    public Entity getProximateDamageSource() {
        return super.getEntity();
        // CraftBukkit end
    }
}