Jump to content

Recommended Posts

Posted

Another idea, if you have a Server available, would be to connect to that via Sockets and let it request The most recent Version and compare that to The actual. That would mean no need to download a file every time

Posted

Instead of coding it yourself, you could also use a mod like [url=http://2091981/]VersionChecker[/url] - all you do is add 2 lines of code to your main class and place a 'versionlist.json' online, such as in your Github repository, and voilá, version checking implemented with a nice interface from the main game menu, ability to download your mod directly from there / see the change log, etc.

Example code:
[code
// put this within FMLInitializationEvent
String link = "https://raw.githubusercontent.com/coolAlias/ZeldaSwordSkills/master/src/main/resources/versionlist.json";
FMLInterModComms.sendRuntimeMessage(ModInfo.ID, "VersionChecker", "addVersionCheck", link);

Note that it's important to use the 'raw' form of the .json, otherwise VC can't read it.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.