summaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/bukkit/craftbukkit/CraftStatistic.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftStatistic.java b/src/main/java/org/bukkit/craftbukkit/CraftStatistic.java
index 905cebe9..9b92cb6d 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftStatistic.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftStatistic.java
@@ -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;
}