Merge remote-tracking branch 'runelite/master'

This commit is contained in:
Owain van Brakel
2021-12-15 05:49:19 +01:00
28 changed files with 382 additions and 141 deletions

View File

@@ -1,189 +0,0 @@
/*
* Copyright (c) 2017, Adam <Adam@sigterm.info>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package net.runelite.http.api.hiscore;
import java.io.IOException;
import java.util.concurrent.CompletableFuture;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import okhttp3.Call;
import okhttp3.Callback;
import okhttp3.HttpUrl;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;
import org.apache.commons.csv.CSVFormat;
import org.apache.commons.csv.CSVParser;
import org.apache.commons.csv.CSVRecord;
@Slf4j
@RequiredArgsConstructor
public class HiscoreClient
{
private final OkHttpClient client;
public HiscoreResult lookup(String username, HiscoreEndpoint endpoint) throws IOException
{
return lookup(username, endpoint.getHiscoreURL());
}
public CompletableFuture<HiscoreResult> lookupAsync(String username, HiscoreEndpoint endpoint)
{
return lookupAsync(username, endpoint.getHiscoreURL());
}
public HiscoreResult lookup(String username, HttpUrl endpoint) throws IOException
{
return lookupSync(username, endpoint);
}
public HiscoreResult lookup(String username) throws IOException
{
return lookup(username, HiscoreEndpoint.NORMAL);
}
public SingleHiscoreSkillResult lookup(String username, HiscoreSkill skill, HiscoreEndpoint endpoint) throws IOException
{
HiscoreResult result = lookupSync(username, endpoint.getHiscoreURL());
if (result == null)
{
return null;
}
Skill requested = result.getSkill(skill);
SingleHiscoreSkillResult skillResult = new SingleHiscoreSkillResult();
skillResult.setPlayer(username);
skillResult.setSkillName(skill.getName());
skillResult.setSkill(requested);
return skillResult;
}
public SingleHiscoreSkillResult lookup(String username, HiscoreSkill skill) throws IOException
{
return lookup(username, skill, HiscoreEndpoint.NORMAL);
}
private HiscoreResult lookupSync(String username, HttpUrl hiscoreUrl) throws IOException
{
try (Response response = client.newCall(buildRequest(username, hiscoreUrl)).execute())
{
return processResponse(username, response);
}
}
private CompletableFuture<HiscoreResult> lookupAsync(String username, HttpUrl hiscoreUrl)
{
CompletableFuture<HiscoreResult> future = new CompletableFuture<>();
client.newCall(buildRequest(username, hiscoreUrl)).enqueue(new Callback()
{
@Override
public void onFailure(Call call, IOException e)
{
future.completeExceptionally(e);
}
@Override
public void onResponse(Call call, Response response) throws IOException
{
try
{
future.complete(processResponse(username, response));
}
finally
{
response.close();
}
}
});
return future;
}
private static Request buildRequest(String username, HttpUrl hiscoreUrl)
{
HttpUrl url = hiscoreUrl.newBuilder()
.addQueryParameter("player", username)
.build();
log.debug("Built URL {}", url);
return new Request.Builder()
.url(url)
.build();
}
private static HiscoreResult processResponse(String username, Response response) throws IOException
{
if (!response.isSuccessful())
{
if (response.code() == 404)
{
return null;
}
throw new IOException("Error retrieving data from Jagex Hiscores: " + response);
}
String responseStr = response.body().string();
return parseResponse(username, responseStr);
}
private static HiscoreResult parseResponse(String username, String responseStr) throws IOException
{
CSVParser parser = CSVParser.parse(responseStr, CSVFormat.DEFAULT);
HiscoreResultBuilder hiscoreBuilder = new HiscoreResultBuilder();
hiscoreBuilder.setPlayer(username);
int count = 0;
for (CSVRecord record : parser.getRecords())
{
if (count++ >= HiscoreSkill.values().length)
{
log.warn("Jagex Hiscore API returned unexpected data");
break; // rest is other things?
}
// rank, level, experience
int rank = Integer.parseInt(record.get(0));
int level = Integer.parseInt(record.get(1));
// items that are not skills do not have an experience parameter
long experience = -1;
if (record.size() == 3)
{
experience = Long.parseLong(record.get(2));
}
Skill skill = new Skill(rank, level, experience);
hiscoreBuilder.setNextSkill(skill);
}
return hiscoreBuilder.build();
}
}

View File

@@ -1,294 +0,0 @@
/*
* Copyright (c) 2017, Adam <Adam@sigterm.info>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package net.runelite.http.api.hiscore;
import lombok.Data;
@Data
public class HiscoreResult
{
private String player;
private Skill overall;
private Skill attack;
private Skill defence;
private Skill strength;
private Skill hitpoints;
private Skill ranged;
private Skill prayer;
private Skill magic;
private Skill cooking;
private Skill woodcutting;
private Skill fletching;
private Skill fishing;
private Skill firemaking;
private Skill crafting;
private Skill smithing;
private Skill mining;
private Skill herblore;
private Skill agility;
private Skill thieving;
private Skill slayer;
private Skill farming;
private Skill runecraft;
private Skill hunter;
private Skill construction;
private Skill leaguePoints;
private Skill bountyHunterHunter;
private Skill bountyHunterRogue;
private Skill clueScrollAll;
private Skill clueScrollBeginner;
private Skill clueScrollEasy;
private Skill clueScrollMedium;
private Skill clueScrollHard;
private Skill clueScrollElite;
private Skill clueScrollMaster;
private Skill lastManStanding;
private Skill soulWarsZeal;
private Skill abyssalSire;
private Skill alchemicalHydra;
private Skill barrowsChests;
private Skill bryophyta;
private Skill callisto;
private Skill cerberus;
private Skill chambersOfXeric;
private Skill chambersOfXericChallengeMode;
private Skill chaosElemental;
private Skill chaosFanatic;
private Skill commanderZilyana;
private Skill corporealBeast;
private Skill crazyArchaeologist;
private Skill dagannothPrime;
private Skill dagannothRex;
private Skill dagannothSupreme;
private Skill derangedArchaeologist;
private Skill generalGraardor;
private Skill giantMole;
private Skill grotesqueGuardians;
private Skill hespori;
private Skill kalphiteQueen;
private Skill kingBlackDragon;
private Skill kraken;
private Skill kreearra;
private Skill krilTsutsaroth;
private Skill mimic;
private Skill nex;
private Skill nightmare;
private Skill phosanisNightmare;
private Skill obor;
private Skill sarachnis;
private Skill scorpia;
private Skill skotizo;
private Skill tempoross;
private Skill gauntlet;
private Skill corruptedGauntlet;
private Skill theatreOfBlood;
private Skill theatreOfBloodHardMode;
private Skill thermonuclearSmokeDevil;
private Skill tzKalZuk;
private Skill tzTokJad;
private Skill venenatis;
private Skill vetion;
private Skill vorkath;
private Skill wintertodt;
private Skill zalcano;
private Skill zulrah;
public Skill getSkill(HiscoreSkill skill)
{
switch (skill)
{
case ATTACK:
return getAttack();
case DEFENCE:
return getDefence();
case STRENGTH:
return getStrength();
case HITPOINTS:
return getHitpoints();
case RANGED:
return getRanged();
case PRAYER:
return getPrayer();
case MAGIC:
return getMagic();
case COOKING:
return getCooking();
case WOODCUTTING:
return getWoodcutting();
case FLETCHING:
return getFletching();
case FISHING:
return getFishing();
case FIREMAKING:
return getFiremaking();
case CRAFTING:
return getCrafting();
case SMITHING:
return getSmithing();
case MINING:
return getMining();
case HERBLORE:
return getHerblore();
case AGILITY:
return getAgility();
case THIEVING:
return getThieving();
case SLAYER:
return getSlayer();
case FARMING:
return getFarming();
case RUNECRAFT:
return getRunecraft();
case HUNTER:
return getHunter();
case CONSTRUCTION:
return getConstruction();
case LEAGUE_POINTS:
return getLeaguePoints();
case OVERALL:
return getOverall();
case BOUNTY_HUNTER_HUNTER:
return getBountyHunterHunter();
case BOUNTY_HUNTER_ROGUE:
return getBountyHunterRogue();
case CLUE_SCROLL_ALL:
return getClueScrollAll();
case CLUE_SCROLL_BEGINNER:
return getClueScrollBeginner();
case CLUE_SCROLL_EASY:
return getClueScrollEasy();
case CLUE_SCROLL_MEDIUM:
return getClueScrollMedium();
case CLUE_SCROLL_HARD:
return getClueScrollHard();
case CLUE_SCROLL_ELITE:
return getClueScrollElite();
case CLUE_SCROLL_MASTER:
return getClueScrollMaster();
case LAST_MAN_STANDING:
return getLastManStanding();
case SOUL_WARS_ZEAL:
return getSoulWarsZeal();
case ABYSSAL_SIRE:
return abyssalSire;
case ALCHEMICAL_HYDRA:
return alchemicalHydra;
case BARROWS_CHESTS:
return barrowsChests;
case BRYOPHYTA:
return bryophyta;
case CALLISTO:
return callisto;
case CERBERUS:
return cerberus;
case CHAMBERS_OF_XERIC:
return chambersOfXeric;
case CHAMBERS_OF_XERIC_CHALLENGE_MODE:
return chambersOfXericChallengeMode;
case CHAOS_ELEMENTAL:
return chaosElemental;
case CHAOS_FANATIC:
return chaosFanatic;
case COMMANDER_ZILYANA:
return commanderZilyana;
case CORPOREAL_BEAST:
return corporealBeast;
case CRAZY_ARCHAEOLOGIST:
return crazyArchaeologist;
case DAGANNOTH_PRIME:
return dagannothPrime;
case DAGANNOTH_REX:
return dagannothRex;
case DAGANNOTH_SUPREME:
return dagannothSupreme;
case DERANGED_ARCHAEOLOGIST:
return derangedArchaeologist;
case GENERAL_GRAARDOR:
return generalGraardor;
case GIANT_MOLE:
return giantMole;
case GROTESQUE_GUARDIANS:
return grotesqueGuardians;
case HESPORI:
return hespori;
case KALPHITE_QUEEN:
return kalphiteQueen;
case KING_BLACK_DRAGON:
return kingBlackDragon;
case KRAKEN:
return kraken;
case KREEARRA:
return kreearra;
case KRIL_TSUTSAROTH:
return krilTsutsaroth;
case MIMIC:
return mimic;
case NEX:
return nex;
case NIGHTMARE:
return nightmare;
case PHOSANIS_NIGHTMARE:
return phosanisNightmare;
case OBOR:
return obor;
case SARACHNIS:
return sarachnis;
case SCORPIA:
return scorpia;
case SKOTIZO:
return skotizo;
case TEMPOROSS:
return tempoross;
case THE_GAUNTLET:
return gauntlet;
case THE_CORRUPTED_GAUNTLET:
return corruptedGauntlet;
case THEATRE_OF_BLOOD:
return theatreOfBlood;
case THEATRE_OF_BLOOD_HARD_MODE:
return theatreOfBloodHardMode;
case THERMONUCLEAR_SMOKE_DEVIL:
return thermonuclearSmokeDevil;
case TZKAL_ZUK:
return tzKalZuk;
case TZTOK_JAD:
return tzTokJad;
case VENENATIS:
return venenatis;
case VETION:
return vetion;
case VORKATH:
return vorkath;
case WINTERTODT:
return wintertodt;
case ZALCANO:
return zalcano;
case ZULRAH:
return zulrah;
default:
throw new IllegalArgumentException("Invalid hiscore skill");
}
}
}

View File

@@ -1,148 +0,0 @@
/*
* Copyright (c) 2017, Adam <Adam@sigterm.info>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package net.runelite.http.api.hiscore;
import java.util.ArrayList;
import java.util.List;
class HiscoreResultBuilder
{
private String player;
private final List<Skill> skills = new ArrayList<>();
public void setPlayer(String player)
{
this.player = player;
}
void setNextSkill(Skill skill)
{
skills.add(skill);
}
public Skill getSkill(int index)
{
return skills.get(index);
}
public HiscoreResult build()
{
HiscoreResult hiscoreResult = new HiscoreResult();
hiscoreResult.setPlayer(player);
int index = 0;
hiscoreResult.setOverall(skills.get(index++));
hiscoreResult.setAttack(skills.get(index++));
hiscoreResult.setDefence(skills.get(index++));
hiscoreResult.setStrength(skills.get(index++));
hiscoreResult.setHitpoints(skills.get(index++));
hiscoreResult.setRanged(skills.get(index++));
hiscoreResult.setPrayer(skills.get(index++));
hiscoreResult.setMagic(skills.get(index++));
hiscoreResult.setCooking(skills.get(index++));
hiscoreResult.setWoodcutting(skills.get(index++));
hiscoreResult.setFletching(skills.get(index++));
hiscoreResult.setFishing(skills.get(index++));
hiscoreResult.setFiremaking(skills.get(index++));
hiscoreResult.setCrafting(skills.get(index++));
hiscoreResult.setSmithing(skills.get(index++));
hiscoreResult.setMining(skills.get(index++));
hiscoreResult.setHerblore(skills.get(index++));
hiscoreResult.setAgility(skills.get(index++));
hiscoreResult.setThieving(skills.get(index++));
hiscoreResult.setSlayer(skills.get(index++));
hiscoreResult.setFarming(skills.get(index++));
hiscoreResult.setRunecraft(skills.get(index++));
hiscoreResult.setHunter(skills.get(index++));
hiscoreResult.setConstruction(skills.get(index++));
hiscoreResult.setLeaguePoints(skills.get(index++));
hiscoreResult.setBountyHunterHunter(skills.get(index++));
hiscoreResult.setBountyHunterRogue(skills.get(index++));
hiscoreResult.setClueScrollAll(skills.get(index++));
hiscoreResult.setClueScrollBeginner(skills.get(index++));
hiscoreResult.setClueScrollEasy(skills.get(index++));
hiscoreResult.setClueScrollMedium(skills.get(index++));
hiscoreResult.setClueScrollHard(skills.get(index++));
hiscoreResult.setClueScrollElite(skills.get(index++));
hiscoreResult.setClueScrollMaster(skills.get(index++));
hiscoreResult.setLastManStanding(skills.get(index++));
hiscoreResult.setSoulWarsZeal(skills.get(index++));
// seasonal doesn't have boss hiscores
if (index < skills.size())
{
hiscoreResult.setAbyssalSire(skills.get(index++));
hiscoreResult.setAlchemicalHydra(skills.get(index++));
hiscoreResult.setBarrowsChests(skills.get(index++));
hiscoreResult.setBryophyta(skills.get(index++));
hiscoreResult.setCallisto(skills.get(index++));
hiscoreResult.setCerberus(skills.get(index++));
hiscoreResult.setChambersOfXeric(skills.get(index++));
hiscoreResult.setChambersOfXericChallengeMode(skills.get(index++));
hiscoreResult.setChaosElemental(skills.get(index++));
hiscoreResult.setChaosFanatic(skills.get(index++));
hiscoreResult.setCommanderZilyana(skills.get(index++));
hiscoreResult.setCorporealBeast(skills.get(index++));
hiscoreResult.setCrazyArchaeologist(skills.get(index++));
hiscoreResult.setDagannothPrime(skills.get(index++));
hiscoreResult.setDagannothRex(skills.get(index++));
hiscoreResult.setDagannothSupreme(skills.get(index++));
hiscoreResult.setDerangedArchaeologist(skills.get(index++));
hiscoreResult.setGeneralGraardor(skills.get(index++));
hiscoreResult.setGiantMole(skills.get(index++));
hiscoreResult.setGrotesqueGuardians(skills.get(index++));
hiscoreResult.setHespori(skills.get(index++));
hiscoreResult.setKalphiteQueen(skills.get(index++));
hiscoreResult.setKingBlackDragon(skills.get(index++));
hiscoreResult.setKraken(skills.get(index++));
hiscoreResult.setKreearra(skills.get(index++));
hiscoreResult.setKrilTsutsaroth(skills.get(index++));
hiscoreResult.setMimic(skills.get(index++));
if (skills.size() > 83)
{
hiscoreResult.setNex(skills.get(index++));
}
hiscoreResult.setNightmare(skills.get(index++));
hiscoreResult.setPhosanisNightmare(skills.get(index++));
hiscoreResult.setObor(skills.get(index++));
hiscoreResult.setSarachnis(skills.get(index++));
hiscoreResult.setScorpia(skills.get(index++));
hiscoreResult.setSkotizo(skills.get(index++));
hiscoreResult.setTempoross(skills.get(index++));
hiscoreResult.setGauntlet(skills.get(index++));
hiscoreResult.setCorruptedGauntlet(skills.get(index++));
hiscoreResult.setTheatreOfBlood(skills.get(index++));
hiscoreResult.setTheatreOfBloodHardMode(skills.get(index++));
hiscoreResult.setThermonuclearSmokeDevil(skills.get(index++));
hiscoreResult.setTzKalZuk(skills.get(index++));
hiscoreResult.setTzTokJad(skills.get(index++));
hiscoreResult.setVenenatis(skills.get(index++));
hiscoreResult.setVetion(skills.get(index++));
hiscoreResult.setVorkath(skills.get(index++));
hiscoreResult.setWintertodt(skills.get(index++));
hiscoreResult.setZalcano(skills.get(index++));
hiscoreResult.setZulrah(skills.get(index++));
}
return hiscoreResult;
}
}

View File

@@ -1,124 +0,0 @@
/*
* Copyright (c) 2017, Adam <Adam@sigterm.info>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package net.runelite.http.api.hiscore;
import lombok.AllArgsConstructor;
import lombok.Getter;
import static net.runelite.http.api.hiscore.HiscoreSkillType.SKILL;
import static net.runelite.http.api.hiscore.HiscoreSkillType.ACTIVITY;
import static net.runelite.http.api.hiscore.HiscoreSkillType.BOSS;
@AllArgsConstructor
@Getter
public enum HiscoreSkill
{
OVERALL("Overall", HiscoreSkillType.OVERALL),
ATTACK("Attack", SKILL),
DEFENCE("Defence", SKILL),
STRENGTH("Strength", SKILL),
HITPOINTS("Hitpoints", SKILL),
RANGED("Ranged", SKILL),
PRAYER("Prayer", SKILL),
MAGIC("Magic", SKILL),
COOKING("Cooking", SKILL),
WOODCUTTING("Woodcutting", SKILL),
FLETCHING("Fletching", SKILL),
FISHING("Fishing", SKILL),
FIREMAKING("Firemaking", SKILL),
CRAFTING("Crafting", SKILL),
SMITHING("Smithing", SKILL),
MINING("Mining", SKILL),
HERBLORE("Herblore", SKILL),
AGILITY("Agility", SKILL),
THIEVING("Thieving", SKILL),
SLAYER("Slayer", SKILL),
FARMING("Farming", SKILL),
RUNECRAFT("Runecraft", SKILL),
HUNTER("Hunter", SKILL),
CONSTRUCTION("Construction", SKILL),
LEAGUE_POINTS("League Points", ACTIVITY),
BOUNTY_HUNTER_HUNTER("Bounty Hunter - Hunter", ACTIVITY),
BOUNTY_HUNTER_ROGUE("Bounty Hunter - Rogue", ACTIVITY),
CLUE_SCROLL_ALL("Clue Scrolls (all)", ACTIVITY),
CLUE_SCROLL_BEGINNER("Clue Scrolls (beginner)", ACTIVITY),
CLUE_SCROLL_EASY("Clue Scrolls (easy)", ACTIVITY),
CLUE_SCROLL_MEDIUM("Clue Scrolls (medium)", ACTIVITY),
CLUE_SCROLL_HARD("Clue Scrolls (hard)", ACTIVITY),
CLUE_SCROLL_ELITE("Clue Scrolls (elite)", ACTIVITY),
CLUE_SCROLL_MASTER("Clue Scrolls (master)", ACTIVITY),
LAST_MAN_STANDING("Last Man Standing", ACTIVITY),
SOUL_WARS_ZEAL("Soul Wars Zeal", ACTIVITY),
ABYSSAL_SIRE("Abyssal Sire", BOSS),
ALCHEMICAL_HYDRA("Alchemical Hydra", BOSS),
BARROWS_CHESTS("Barrows Chests", BOSS),
BRYOPHYTA("Bryophyta", BOSS),
CALLISTO("Callisto", BOSS),
CERBERUS("Cerberus", BOSS),
CHAMBERS_OF_XERIC("Chambers of Xeric", BOSS),
CHAMBERS_OF_XERIC_CHALLENGE_MODE("Chambers of Xeric: Challenge Mode", BOSS),
CHAOS_ELEMENTAL("Chaos Elemental", BOSS),
CHAOS_FANATIC("Chaos Fanatic", BOSS),
COMMANDER_ZILYANA("Commander Zilyana", BOSS),
CORPOREAL_BEAST("Corporeal Beast", BOSS),
CRAZY_ARCHAEOLOGIST("Crazy Archaeologist", BOSS),
DAGANNOTH_PRIME("Dagannoth Prime", BOSS),
DAGANNOTH_REX("Dagannoth Rex", BOSS),
DAGANNOTH_SUPREME("Dagannoth Supreme", BOSS),
DERANGED_ARCHAEOLOGIST("Deranged Archaeologist", BOSS),
GENERAL_GRAARDOR("General Graardor", BOSS),
GIANT_MOLE("Giant Mole", BOSS),
GROTESQUE_GUARDIANS("Grotesque Guardians", BOSS),
HESPORI("Hespori", BOSS),
KALPHITE_QUEEN("Kalphite Queen", BOSS),
KING_BLACK_DRAGON("King Black Dragon", BOSS),
KRAKEN("Kraken", BOSS),
KREEARRA("Kree'Arra", BOSS),
KRIL_TSUTSAROTH("K'ril Tsutsaroth", BOSS),
MIMIC("Mimic", BOSS),
NEX("Nex", BOSS),
NIGHTMARE("Nightmare", BOSS),
PHOSANIS_NIGHTMARE("Phosani's Nightmare", BOSS),
OBOR("Obor", BOSS),
SARACHNIS("Sarachnis", BOSS),
SCORPIA("Scorpia", BOSS),
SKOTIZO("Skotizo", BOSS),
TEMPOROSS("Tempoross", BOSS),
THE_GAUNTLET("The Gauntlet", BOSS),
THE_CORRUPTED_GAUNTLET("The Corrupted Gauntlet", BOSS),
THEATRE_OF_BLOOD("Theatre of Blood", BOSS),
THEATRE_OF_BLOOD_HARD_MODE("Theatre of Blood: Hard Mode", BOSS),
THERMONUCLEAR_SMOKE_DEVIL("Thermonuclear Smoke Devil", BOSS),
TZKAL_ZUK("TzKal-Zuk", BOSS),
TZTOK_JAD("TzTok-Jad", BOSS),
VENENATIS("Venenatis", BOSS),
VETION("Vet'ion", BOSS),
VORKATH("Vorkath", BOSS),
WINTERTODT("Wintertodt", BOSS),
ZALCANO("Zalcano", BOSS),
ZULRAH("Zulrah", BOSS);
private final String name;
private final HiscoreSkillType type;
}