To use the Multicraft API client, the following things are required:
- Get a hosted Multicraft instance
- Create an account on your Multicraft panel.
- Check that your Multicraft panel is reachable from your API (in the same network).
- Make sure that the API of the Multicraft instance is enabled.
- Settings -> Panel configuration
- Check if via http://yourpanel.com/api.php
- Get your API key (Profile -> API key)
- Now you're ready to use the Multicraft API client.
- Java >= 8
By far the easiest way to install the Multicraft Java API client is to include it in your pom.xml within your Maven project.
To do so add this repository to your pom.xml:
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
<!-- Other repositories... -->
</repositories>
And this dependeny:
<dependencies>
<dependency>
<groupId>com.github.pavog</groupId>
<artifactId>multicraft-api</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
<!-- Other dependencies ... -->
</dependencies>
Please change the <version>1.0.0-SNAPSHOT</version>
to the newest version. You can find the newest version on the github releases.
If you're not familiar with using maven we've added a JAR file to the releases which you can add manually to your project.
- Download the
multicraftapi-X.Y.Z-SNAPSHOT.jar
from the latest release page. - Include it in your project in the IDE's settings.
Initializing the Multicraft API client, and setting your panel url, username and API key.
String testApiUrl = "https://panel.testurl.com/api.php";
String testApiUsername = "username";
String testApiKey = "api-key";
MulticraftAPI api = new MulticraftAPI(testApiUrl, testApiUsername, testApiKey);
If you wish to learn more about the API, please visit the Multicraft Developer Portal. API Documentation is available in English and only for the PHP methods.
Want to help us make our API client even better? We take pull requests and issue reports.
MIT License. Made by Paul Vogel