Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Auto Updating Mod {NOT SOLVED}


coolboy4531
 Share

Recommended Posts

It's not that easy. You need to be familiar with java coding.

First you need to get some webspace. In there have a text file which contains information about the current version of you mod.

When Minecraft starts up, download that file from your mod (google: java download file) and check if the version in it matches the currently installed one. if not, you need to update.

To do that, download the new mod-zip (url should be provided in the text file) to a temporary location (google: java create temp file). Once it finishes downloading just copy it over your old mod file.

To find the file your mod is loaded from use something like this:

URLConnection codesource = YourMod.class.getProtectionDomain().getCodeSource().getLocation().openConnection();
if (codesource instanceof JarURLConnection) {
    URL myModZipFile = ((JarURLConnection)codesource).getJarFileURL();
    // update file
}

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.