Compare commits

...

4 Commits

Author SHA1 Message Date
ceze88 df6b0cd399 Merge branch 'development' 2023-04-13 20:38:35 +02:00
ceze88 a09548cb1b Release 3.4.2 2023-04-13 20:38:10 +02:00
ceze88 df1bba0f01 Updates SongodaCore to 2.6.19 2023-04-13 20:37:54 +02:00
Christian Koop aadf55fc0a
Download head-dump/heads.json from GitHub Pages instead of head-db.com
Details explained in 1ea1e06431
2023-04-06 10:40:50 +02:00
2 changed files with 4 additions and 4 deletions

View File

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

View File

@ -221,13 +221,13 @@ public class EpicHeads extends SongodaPlugin {
private void downloadHeads() {
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));
String jsonText = readAll(rd);
JSONParser parser = new JSONParser();
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());
}
} catch (Exception ex) {