Skip to content

The SimplifiedApi is a fast, powerful, utility library that provides quick and easy Java development for the official Hypixel SkyBlock API.

License

Notifications You must be signed in to change notification settings

SkyBlock-Simplified/api

Repository files navigation

SimplifiedApi

Support Server Invite GitHub Issues GitHub Pull Requests GitHub Last Commit

The SimplifiedApi is a fast, powerful, utility library that provides quick and easy Java development for the official Hypixel SkyBlock API.

⚡ Quick Example

In this example, we initiate a default SQL database session, pull a filtered collection of ItemModels, and pull the profile of CraftedFury from the Hypixel SkyBlock API.

public class ExampleApp {
    public static void main(String[] args) {
        // Create a Session
        SimplifiedApi.getSessionManager().connect(SqlConfig.defaultSql());

        // Query Session Repository
        ConcurrentList<ItemModel> campfireTalismans = SimplifiedApi.getRepositoryOf(ItemModel.class)
            .stream()
            .filter(itemModel -> itemModel.getKey().startsWith("CAMPFIRE_TALISMAN"))
            .collect(Concurrent.toList());

        // Retrieve Request Proxy
        HypixelSkyBlockRequest hypixelSkyBlockRequest = SimplifiedApi.getWebApi(HypixelSkyBlockRequest.class);

        // Query Hypixel API
        UUID craftedFuryUUID = "f33f51a7-9691-4076-abda-f66e3d047a71";
        SkyBlockProfilesResponse profiles = hypixelSkyBlockRequest.getProfiles(craftedFuryUUID);

        // Get Selected Island
        SkyBlockIsland island = profiles.getSelected();
        
        // Get Enhanced Island (Database Features, Requires Active Session)
        EnhancedSkyBlockIsland enhancedIsland = island.asEnhanced();
    }
}

Make sure you have defined the following environment variables:

DATABASE_HOST, DATABASE_SCHEMA, DATABASE_PORT, DATABASE_USER, DATABASE_PASSWORD

🔗 Quick Links

  Features

  • Reflection - Helper class and methods to introspect classes, methods and fields. Includes a fast, efficient class file locator, type-matched methods/constructors, accessor caching, superclass getters, and more.
  • Minecraft
    • NbtFactory - Efficient reading and writing of NBT data structures, independent of the Minecraft client source code.
    • Ping - Ping Minecraft servers and get the server information.
    • Generators - Generate 1.8.9-identical Chat and Lore, Textured Skulls, Recipes, and more.
  • Math Evaluation - Evaluate mathematical expressions, includes variable support and many math functions.
  • YAML Config - Easily build your own YAML file storage by extending a class with YamlConfig.
  • Hibernate - SQL domain model persistence, query the persistence cache via the above quick example, and much more.
  • Feign HTTP Proxies - Use and build HTTP proxies to quickly access Web API's.
  • Managers
    • Service Manager - Retrieve a built service using the associated class file.
    • Builder Manager - Retrieve a builder class using the associated class file.
    • Key Manager - Retrieve a key using the associated name.
  • Utilities
    • Builder - Simple helper classes to assist with class/method building using Reflection.
    • Collections
      • Concurrency - Fast and efficient cross-thread-safe collection classes, including Collection, Deque, List, Map, Queue and Set.
      • Search - Quickly search/match Collections/Lists for 1+ objects using method references.
      • Graph - Sort a collection that share the same superclass topologically, this is used for efficient Hibernate loading.
    • Helpers - Classes to help you with reading and manipulating java types and resources.
    • Streams
      • PairStream - Custom stream wrapper for Maps that converts Stream<Map.Entry<K, V>> to PairStream<K, V>. AtomicMap and its inheritors all implement this, allowing you to interact using only K/V on top of Map.Entry<K, V>.
      • TripleStream - Custom stream wrapper for Collections that converts Stream<T> to TripleStream<T, M, R>. AtomicCollection and its inheritors all implement this as an indexed stream, allowing you to know the position of each element and the size of the stream.
    • Other - CommandLine, Mutables, Tuples (Pair/Triple), GSON adapters, etc.

📦 Standalone Installation

WIP

  Docker Installation

WIP

Old Instructions

  • Docker
    • docker pull mysql:latest
    • docker run -p 3306:3306 --name sbs-mysql -e MYSQL_ROOT_PASSWORD={{ROOT PASSWORD}} -d mysql
  • Container
    • mysql -uroot -p{{ROOT_PASSWORD}}
      • create user 'sbsadmin'@'%' identified by '{{ROOT_PASSWORD}}';
      • flush privileges;
      • create database skyblocksimplified;
      • grant all privileges on skyblocksimplified.* to 'sbsadmin'@'%';

About

The SimplifiedApi is a fast, powerful, utility library that provides quick and easy Java development for the official Hypixel SkyBlock API.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages