mirror of
https://github.com/songoda/EpicHeads.git
synced 2024-11-14 06:35:18 +01:00
Merge branch 'development'
This commit is contained in:
commit
df6b0cd399
4
pom.xml
4
pom.xml
@ -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>
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user