public static String getTranslationKey(Entity entity) { if(entity instanceof TNTPrimed) { return "tile.tnt.name"; } else if(entity instanceof Egg) { return "item.egg.name"; } else { final String id = EntityTypes.b(((CraftEntity) entity).getHandle()); return "entity." + (id != null ? id : "generic") + ".name"; } }
public static net.minecraft.server.Statistic getEntityStatistic(org.bukkit.Statistic stat, EntityType entity) { MonsterEggInfo monsteregginfo = (MonsterEggInfo) EntityTypes.eggInfo.get(Integer.valueOf(entity.getTypeId())); if (monsteregginfo != null) { return monsteregginfo.killEntityStatistic; } return null; }
public static net.minecraft.server.Statistic getEntityStatistic(org.bukkit.Statistic stat, EntityType entity) { MonsterEggInfo monsteregginfo = (MonsterEggInfo) EntityTypes.eggInfo.get(entity.getName()); if (monsteregginfo != null) { if (stat == org.bukkit.Statistic.KILL_ENTITY) { return monsteregginfo.killEntityStatistic; } if (stat == org.bukkit.Statistic.ENTITY_KILLED_BY) { return monsteregginfo.killedByEntityStatistic; } } return null; }