SPIGOT-1772: Use correct statistics for entities
By: BlackHole <black-hole@live.com>
This commit is contained in:
parent
2af4470275
commit
819131cad1
1 changed files with 7 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue