mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-09 03:43:40 +01:00
SPIGOT-1772: Use correct statistics for entities
This commit is contained in:
parent
73eff0d75d
commit
45171f0864
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…
Reference in a new issue