13
0
geforkt von Mirrors/Paper

SPIGOT-1772: Use correct statistics for entities

By: BlackHole <black-hole@live.com>
Dieser Commit ist enthalten in:
CraftBukkit/Spigot 2016-03-05 20:58:48 +01:00
Ursprung 2af4470275
Commit 819131cad1

Datei anzeigen

@ -126,10 +126,15 @@ public class CraftStatistic {
} }
public static net.minecraft.server.Statistic getEntityStatistic(org.bukkit.Statistic stat, EntityType entity) { 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) { 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; return null;
} }