Save bandwidth. Grab only the header.

master
sigonasr2 8 years ago
parent bb9cf0634f
commit 26723cc5f0
  1. BIN
      AutoPluginUpdate.jar
  2. 6
      src/sig/plugin/AutoPluginUpdate/AutoPluginUpdate.java
  3. 1
      src/sig/plugin/AutoPluginUpdate/PluginManager.java

Binary file not shown.

@ -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);
}
}

@ -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();

Loading…
Cancel
Save