wildernesslocations: Use interface instead of type

This commit is contained in:
sdburns1998
2019-07-07 21:55:17 +02:00
parent f706c1ae41
commit ddb0ea8929

View File

@@ -81,7 +81,7 @@ public class WildernessLocationsPlugin extends Plugin
private String oldChat = "";
private int currentCooldown = 0;
private WorldPoint worldPoint = null;
private final HashMap<WorldArea, String> wildLocs = getLocationMap();
private final Map<WorldArea, String> wildLocs = getLocationMap();
private final HotkeyListener hotkeyListener = new HotkeyListener(() -> this.keybind)
{
@@ -202,9 +202,9 @@ public class WildernessLocationsPlugin extends Plugin
return s;
}
private static HashMap<WorldArea, String> getLocationMap()
private static Map<WorldArea, String> getLocationMap()
{
HashMap<WorldArea, String> hashMap = new HashMap<>();
Map<WorldArea, String> hashMap = new HashMap<>();
Arrays.stream(WildernessLocation.values()).forEach(wildernessLocation ->
hashMap.put(wildernessLocation.getWorldArea(), wildernessLocation.getName()));
return hashMap;