Merge branch 'development'

This commit is contained in:
ceze88 2023-04-13 20:38:35 +02:00
commit df6b0cd399
2 changed files with 4 additions and 4 deletions

View File

@ -3,7 +3,7 @@
<groupId>com.songoda</groupId> <groupId>com.songoda</groupId>
<artifactId>EpicHeads</artifactId> <artifactId>EpicHeads</artifactId>
<version>3.4.2-BETA</version> <version>3.4.2</version>
<build> <build>
<defaultGoal>clean install</defaultGoal> <defaultGoal>clean install</defaultGoal>
@ -122,7 +122,7 @@
<dependency> <dependency>
<groupId>com.songoda</groupId> <groupId>com.songoda</groupId>
<artifactId>SongodaCore</artifactId> <artifactId>SongodaCore</artifactId>
<version>2.6.19-DEV</version> <version>2.6.19</version>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
</dependencies> </dependencies>

View File

@ -221,13 +221,13 @@ public class EpicHeads extends SongodaPlugin {
private void downloadHeads() { private void downloadHeads() {
try { try {
InputStream is = new URL("http://www.head-db.com/dump").openStream(); InputStream is = new URL("https://songoda.github.io/EpicHeads/heads.json").openStream();
BufferedReader rd = new BufferedReader(new InputStreamReader(is, StandardCharsets.UTF_8)); BufferedReader rd = new BufferedReader(new InputStreamReader(is, StandardCharsets.UTF_8));
String jsonText = readAll(rd); String jsonText = readAll(rd);
JSONParser parser = new JSONParser(); JSONParser parser = new JSONParser();
JSONArray json = (JSONArray) parser.parse(jsonText); JSONArray json = (JSONArray) parser.parse(jsonText);
try (FileWriter file = new FileWriter(getDataFolder() + "/heads.json")) { try (FileWriter file = new FileWriter(new File(getDataFolder(), "heads.json"))) {
file.write(json.toJSONString()); file.write(json.toJSONString());
} }
} catch (Exception ex) { } catch (Exception ex) {