Skip to content
filliravaz edited this page Dec 29, 2022 · 2 revisions

Welcome to the mcss-api-java wiki!

This wiki will provide a quick start guide for your projects! If you want to improve the wiki, feel free to edit it and send us a PR! (Please specify in the name that you're updating the wiki)

Quick Start

Installing the Maven dependency

The wrapper is currently only available as a Maven dependency, but you can still use it in a gradle project.
It's also available in Maven Central, so you don't need to add some weird repositories to be able to import it.

To add the wrapper to your project, add this to the POM.XML

In the repositories section, if not present already

<repository>  
    <id>central</id>  
    <name>Maven Central</name>  
    <layout>default</layout>  
    <url>https://repo1.maven.org/maven2</url>  
</repository>  

In the dependencies section

<dependency>
  <groupId>dev.le-app</groupId>
  <artifactId>mcss-api-java</artifactId>
  <version>1.2.1.1</version>
</dependency>

Using the API

This is the fun part!
MCSSApi api = new MCSSApi(IP, TOKEN);
That was easy, but:
IMPORTANT: THE API ONLY RUNS WITH SSL ENABLED. Sending a token without encryption is NOT safe. To use the default self-signed certificate that MCSS provides, use MCSSApi api = new MCSSApi(IP, TOKEN, true);. This will remove the checks for a certificate. SSL is still needed.

Now, please note that the IP should only be IP:PORT without anything else (no https:// or /api/v1). So 127.0.0.1:25560 is a correct IP.

Congratulations! You have created the API object.

Clone this wiki locally