2012-11-05 20:29:04 +01:00
|
|
|
package mekanism.common;
|
|
|
|
|
2013-08-27 00:57:08 +02:00
|
|
|
import mekanism.common.util.MekanismUtils;
|
|
|
|
|
2012-11-05 20:29:04 +01:00
|
|
|
/**
|
|
|
|
* Thread used to retrieve data from the Mekanism server.
|
|
|
|
* @author AidanBrady
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
public class ThreadGetData extends Thread
|
|
|
|
{
|
|
|
|
public ThreadGetData()
|
|
|
|
{
|
|
|
|
setDaemon(true);
|
|
|
|
start();
|
|
|
|
}
|
|
|
|
|
2012-11-06 16:44:14 +01:00
|
|
|
@Override
|
2012-11-05 20:29:04 +01:00
|
|
|
public void run()
|
|
|
|
{
|
|
|
|
Mekanism.latestVersionNumber = MekanismUtils.getLatestVersion();
|
|
|
|
Mekanism.recentNews = MekanismUtils.getRecentNews();
|
|
|
|
System.out.println("[Mekanism] Successfully retrieved data from server.");
|
|
|
|
try {
|
|
|
|
finalize();
|
|
|
|
} catch(Throwable t) {
|
|
|
|
System.out.println("[Mekanism] Unable to finalize server data.");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|