13
0
geforkt von Mirrors/Paper

SPIGOT-1772: Use correct statistics for entities

Dieser Commit ist enthalten in:
BlackHole 2016-03-05 20:58:48 +01:00 committet von md_5
Ursprung 73eff0d75d
Commit 45171f0864

Datei anzeigen

@ -126,10 +126,15 @@ public class CraftStatistic {
}
public static net.minecraft.server.Statistic getEntityStatistic(org.bukkit.Statistic stat, EntityType entity) {
MonsterEggInfo monsteregginfo = (MonsterEggInfo) EntityTypes.eggInfo.get(Integer.valueOf(entity.getTypeId()));
MonsterEggInfo monsteregginfo = (MonsterEggInfo) EntityTypes.eggInfo.get(entity.getName());
if (monsteregginfo != null) {
return monsteregginfo.killEntityStatistic;
if (stat == org.bukkit.Statistic.KILL_ENTITY) {
return monsteregginfo.killEntityStatistic;
}
if (stat == org.bukkit.Statistic.ENTITY_KILLED_BY) {
return monsteregginfo.e; // PAIL: rename
}
}
return null;
}