opponent info plugin: Fix SDMM hiscore lookup

SDMM worlds have both `DEADMAN` and `SEASONAL_DEADMAN` types, so we
must check for the latter first to accurately determine the hiscore
lookup endpoint.
This commit is contained in:
Jordan Atwood
2018-07-20 16:45:15 -07:00
parent 67bb02c42e
commit 6c1aefc8d9

View File

@@ -118,14 +118,14 @@ public class OpponentInfoPlugin extends Plugin
}
EnumSet<WorldType> worldType = client.getWorldType();
if (worldType.contains(WorldType.DEADMAN))
{
hiscoreEndpoint = HiscoreEndpoint.DEADMAN;
}
else if (worldType.contains(WorldType.SEASONAL_DEADMAN))
if (worldType.contains(WorldType.SEASONAL_DEADMAN))
{
hiscoreEndpoint = HiscoreEndpoint.SEASONAL_DEADMAN;
}
else if (worldType.contains(WorldType.DEADMAN))
{
hiscoreEndpoint = HiscoreEndpoint.DEADMAN;
}
else
{
hiscoreEndpoint = HiscoreEndpoint.NORMAL;