Save bandwidth. Grab only the header.

This commit is contained in:
sigonasr2 2017-01-24 01:36:50 -06:00
parent bb9cf0634f
commit 26723cc5f0
3 changed files with 4 additions and 3 deletions

Binary file not shown.

View File

@ -33,9 +33,9 @@ public class AutoPluginUpdate extends JavaPlugin implements Listener{
@Override
public void onEnable() {
log("Booting up...",LOG_NORMAL);
//log("Booting up...",LOG_NORMAL);
datafolder = getDataFolder();
log("Data folder is located at "+datafolder,LOG_DETAIL);
//log("Data folder is located at "+datafolder,LOG_DETAIL);
CheckIfMainServer();
@ -47,7 +47,7 @@ public class AutoPluginUpdate extends JavaPlugin implements Listener{
Bukkit.getPluginManager().registerEvents(this, this);
if (!restarting_server && main_server) {
Bukkit.getScheduler().runTaskTimerAsynchronously(this, pluginupdater, 6000l, 6000l);
Bukkit.getScheduler().runTaskTimerAsynchronously(this, pluginupdater, 600l, 600l);
}
}

View File

@ -69,6 +69,7 @@ public class PluginManager implements Runnable{
HttpURLConnection httpCon = null;
try {
httpCon = (HttpURLConnection) url.openConnection();
httpCon.setRequestMethod("HEAD");
} catch (IOException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();