2020-09-09 16:49:01 +02:00
|
|
|
package de.ellpeck.actuallyadditions.common.misc.special;
|
2015-11-02 20:55:19 +01:00
|
|
|
|
|
|
|
import java.io.InputStreamReader;
|
|
|
|
import java.net.URL;
|
|
|
|
import java.util.Properties;
|
|
|
|
|
2020-09-09 16:49:01 +02:00
|
|
|
import de.ellpeck.actuallyadditions.common.ActuallyAdditions;
|
2015-11-02 20:55:19 +01:00
|
|
|
|
2019-05-02 09:10:29 +02:00
|
|
|
public class ThreadSpecialFetcher extends Thread {
|
|
|
|
|
|
|
|
public ThreadSpecialFetcher() {
|
|
|
|
this.setName(ActuallyAdditions.NAME + " Special Fetcher");
|
2015-11-02 20:55:19 +01:00
|
|
|
this.setDaemon(true);
|
|
|
|
this.start();
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2019-05-02 09:10:29 +02:00
|
|
|
public void run() {
|
2018-05-10 11:38:58 +02:00
|
|
|
ActuallyAdditions.LOGGER.info("Fetching Special People Stuff...");
|
2019-05-02 09:10:29 +02:00
|
|
|
try {
|
2020-11-07 14:32:06 +01:00
|
|
|
URL url = new URL("https://raw.githubusercontent.com/Ellpeck/ActuallyAdditions/main/specialPeopleStuff.properties");
|
2015-11-02 21:38:49 +01:00
|
|
|
Properties specialProperties = new Properties();
|
2015-11-02 20:55:19 +01:00
|
|
|
specialProperties.load(new InputStreamReader(url.openStream()));
|
2015-11-02 21:38:49 +01:00
|
|
|
SpecialRenderInit.parse(specialProperties);
|
2015-11-02 20:55:19 +01:00
|
|
|
|
2018-05-10 11:38:58 +02:00
|
|
|
ActuallyAdditions.LOGGER.info("Fetching Special People Stuff done!");
|
2019-05-02 09:10:29 +02:00
|
|
|
} catch (Exception e) {
|
2018-05-10 11:38:58 +02:00
|
|
|
ActuallyAdditions.LOGGER.error("Fetching Special People Stuff failed! (You can ignore this error technically.)", e);
|
2015-11-02 20:55:19 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|