-
Notifications
You must be signed in to change notification settings - Fork 17
Including API in your projects
This page describes how to include MCLauncherAPI in your projects. MCLauncherAPI targets Java7, but it should work also on higher versions.
Please note this page still isn't finished, so some things from this tutorial might not work. If you find out something doesn't work, please open a ticket and write a good description of what you were trying to do. I'll be glad to help :)
If you want to use this in your project, it's recommended to download the latest JAR file available in releases section on top of the page. Except of the API itself, you need json-smart version 1.1.1. Add both of these JAR files to build path using your IDE and you're ready to code!
Online Javadocs for the API are available at these sites(choose your version):
- 0.3.1: https://tomsik68.github.io/mclauncher-api/javadoc/0.3.1
- 0.3: https://tomsik68.github.io/mclauncher-api/javadoc/0.3
- 0.2.1: https://tomsik68.github.io/mclauncher-api/javadoc/0.2.1
Development versions are usually unstable and lots of these versions can be created in very short time. So only do this if you want to keep up with the latest features even though they're very unstable...
MCLauncherAPI uses maven2 to automate compilation process, so if you know how to use maven, you can add my maven repository:
<project>
<repositories>
<repository>
<id>sk_tomsik68</id>
<name>Tomsik68's maven repository</name>
<url>https://raw.githubusercontent.com/tomsik68/maven-repo/master/</url>
</repository>
</repositories>
</project>
and then add mclauncher-api as dependency to your project:
<project>
<dependencies>
<dependency>
<groupId>sk.tomsik68</groupId>
<artifactId>mclauncher-api</artifactId>
<version>0.3.1</version>
</dependency>
</dependencies>
</project>
download the project, compile it, publish it to your local repo and add it as a dependency to your project.
You can download pre-built JARs from releases section or here: https://github.com/tomsik68/maven-repo/tree/master/sk/tomsik68/mclauncher-api Select the version you want to use(latest is the best) and download mclauncher-api-{version}.jar . You can also download javadocs and sources jars if you want.
-
Find your home - Where is the
.minecraft
folder?
- MinecraftLauncherBackend & GlobalAuthenticationSystem - Logging in, Updating, Running the game
- Login - Logging in with password or session ID
- Profile I/O - Saving/Loading login credentials
- LAN Server Discovery - Discovering servers which are running on LAN
- Loading saved servers - Loading servers from servers.dat