Skip to content

AmarUCLA/Slothpixel-JVM

Repository files navigation

Slothpixel-JVM

License

API Wrapper for the Slothpixel API for the Java Virtual Machine.

Currently with this library you can:

  • Get individual player stats, quests, achievements and recently played games.
  • Get stats for a guild and its members.
  • Get booster data.
  • Get Leaderboard data.
  • Get Hypixel Resources
  • Get SkyBlock profile, auction and bazaar data.
  • Get staff and Watchdog ban data.
  • Get Slothpixel service status/health data.

And it does all of this without the need of a Hypixel API Key!

Usage

I highly recommend you read through the Slothpixel Docs before or as you use this library because this library is not well or fully documented.

Here is a simple Java example of the library in action:

public static void main(String[] args) {
    // Make an instance of the Slothpixel API.
    Slothpixel slothpixel = new Slothpixel();
    // Save a request as a local variable.
    Player player = slothpixel.getPlayer("Aerondight");

    System.out.println("UUID: " + player.getUuid());
    System.out.println("Karma: " + player.getKarma());
    System.out.println("Discord: " + player.getLinks().getDiscord());

    // Save a specific game's stats.
    TKR tkr = player.getStats().getTkr();

    System.out.println("Coins: " + tkr.getCoins());
    System.out.println("Gold Trophies: " + tkr.getTrophies().getGold());
}

More examples can be found in src/test. Currently there are examples in Java, Kotlin and Scala (as of right now, the Scala ones are the most complete).

Installation

You can add the library to your project via Jitpack by adding the following to your dependencies:

repositories {
    // 
	maven { url 'https://jitpack.io' }
}

dependencies {
    // Required Gson library.
    implementation 'com.google.code.gson:gson:2.8.5'
    // Required Kotlin sdk. You do not need to include this if your project is written in Kotlin.
    implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.61'
    // The actual project
    implementation 'com.github.mew:Slothpixel-JVM:master-SNAPSHOT'
}

It should work well with any JVM language (just note that it is targeted towards JDK 8).

About

JVM wrapper for the Slothpixel API

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors