Starboard Documentation

website·Indexed 29 days ago

https://starboard.ecr.dev

Documentation for Starboard, a project currently in Alpha providing a framework, CLI (v1.0.0-pre.9), and API for interacting with Hypixel and Mojang data. It includes the @mcsb/api module with classes like HypixelAPI and MojangAPI, and the @mcsb/schemas package containing TypeScript interfaces for Hypixel players, guilds, and SkyBlock profiles.

Tokens
67.2K
Snippets
400
Records
491
Agent score
49%

What's inside Starboard

  1. Overview of Starboard for Minecraft Mod Development

    Starboard is a collection of tools providing a no-code web backend for developers creating Minecraft software. It is designed to eliminate the requirement for mod developers to build and maintain their own web backends. It offers two primary paths for integration: a trivial no-code solution via a CLI for simple needs, and the Starboard Framework and API for developers requiring custom logic and complex use-cases. Note: Starboard is currently in Alpha and is not yet production-ready; features and APIs are subject to rapid change.
  2. Overview of the Starboard API

    The Starboard API (v1.0.0-pre.9) is a next-generation wrapper for the Hypixel API designed to simplify integration into applications. It provides an extensible API system and focuses on type safety through automatic type definition generation.
  3. Overview of @mcsb/cli

    @mcsb/cli is a command line tool designed to spin up a customizable backend specifically for Minecraft mods.
  4. Fetch public resource endpoints with HypixelResources

    The HypixelResources class provides an interface for fetching public resource endpoints from the Hypixel API. These resources are data that do not require an API key and change infrequently.

    Unlike other API implementations, HypixelResources fetches all resources immediately upon initialization and refreshes them at a set interval, regardless of whether they are actively being requested. This refresh interval is managed by HypixelResourcesOptions.refreshInterval and operates independently of the HttpClient cache policy.

  5. HypixelGuild Interface Reference

    The HypixelGuild interface represents a guild on the Hypixel server. It includes metadata about the guild's identity, economy, experience, and membership.
    interface HypixelGuild {
      _id: string;
      name: string;
      tag?: string;
      tagColor?: string;
      description?: string;
      created?: number;
      coins?: number;
      coinsEver?: number;
      exp?: number;
      joinable?: boolean;
      publiclyListed?: boolean;
      hideGmTag?: boolean;
      name_lower?: string;
      preferredGames?: string[];
      chatMute?: number;
      legacyRanking?: number;
      achievements?: {
        EXPERIENCE_KINGS?: number;
        ONLINE_PLAYERS?: number;
        WINNERS?: number;
        [k: string]: unknown;
      };
      banner?: {
        Base?: string | number;
        Patterns?: Array<{ [k: string]: unknown; Color?: string | number; Pattern?: string }>;
        [k: string]: unknown;
      };
      guildExpByGameType?: {
        ARCADE?: number;
        ARENA?: number;
        BATTLEGROUND?: number;
        BEDWARS?: number;
        BUILD_BATTLE?: number;
        DUELS?: number;
        GINGERBREAD?: number;
        HOUSING?: number;
        LEGACY?: number;
        MCGO?: number;
        MURDER_MYSTERY?: number;
        PAINTBALL?: number;
        PIT?: number;
        PROTOTYPE?: number;
        QUAKECRAFT?: number;
        REPLAY?: number;
        SKYBLOCK?: number;
        SKYWARS?: number;
        SMP?: number;
        SPEED_UHC?: number;
        SUPER_SMASH?: number;
        SURVIVAL_GAMES?: number;
        TNTGAMES?: number;
        UHC?: number;
        VAMPIREZ?: number;
        WALLS?: number;
        WALLS3?: number;
        WOOL_GAMES?: number;
        [k: string]: unknown;
      };
      members?: Array<{
        uuid?: string;
        name?: string;
        rank?: string;
        joined?: number;
        mutedTill?: number;
        questParticipation?: number;
        expHistory?: { [k: string]: number };
        [k: string]: unknown;
      }>;
      ranks?: Array<{
        name?: string;
        tag?: string | null;
        priority?: number;
        default?: boolean;
        created?: number;
        [k: string]: unknown;
      }>;
      [k: string]: unknown;
    }
  6. Retrieve Hypixel booster information using HypixelAPI.getBoosters

    The getBoosters method of the HypixelAPI class retrieves detailed information about active and scheduled boosters. It returns a Promise that resolves to an object containing booster metadata such as the booster ID, amount, activation date, game type, and purchaser UUID. The returned object also includes helper methods getDateScheduled to retrieve the scheduled date and stackedIterator for iterating over stacked boosters.
    // Example usage of getBoosters
    const boosters = await hypixelAPI.getBoosters();
    console.log(boosters._id);
    console.log(boosters.getDateScheduled());
  7. Use RateLimitDeferPolicy to manage HTTP rate limits

    The RateLimitDeferPolicy class implements IDeferPolicy and is used to defer outgoing HTTP requests based on three specific rate limit headers: one for the total allowed requests, one for the remaining requests, and one for the seconds remaining until the next reset. It is primarily designed for the Hypixel API. It supports 'bursting', allowing short bursts of requests to pass through, which can be disabled by setting the burst ratio to 1.0.
  8. HypixelAchievements interface property definitions

    The HypixelAchievements interface contains properties for specific game achievements. Each achievement object follows a consistent structure containing metadata about the achievement's name, description, point value, and unlock percentages.
    interface HypixelAchievements {
      S_TIME_TRIAL_DEAD?: {
        [k: string]: unknown;
        description?: string;
        gamePercentUnlocked?: number;
        globalPercentUnlocked?: number;
        name?: string;
        points?: number;
      };
      ZOMBIES_ULTIMATE?: {
        [k: string]: unknown;
        description?: string;
        gamePercentUnlocked?: number;
        globalPercentUnlocked?: number;
        name?: string;
        points?: number;
      };
      ZOMBIES_WIN?: {
        [k: string]: unknown;
        description?: string;
        gamePercentUnlocked?: number;
        globalPercentUnlocked?: number;
        name?: string;
        points?: number;
      };
    }
  9. Reference HypixelSkyBlockMuseum item properties

    The HypixelSkyBlockMuseum interface contains properties for various museum items. Most items follow a consistent structure containing metadata about the donation and the item itself. Common properties include borrowing (boolean), donated_time (number), featured_slot (string), and an items object containing data (string) and type (number).
    interface MuseumItem {
      borrowing?: boolean;
      donated_time?: number;
      featured_slot?: string;
      items?: {
        [k: string]: unknown;
        data?: string;
        type?: number;
      };
      [k: string]: unknown;
    }
    
    // Example of specific items available in HypixelSkyBlockMuseum:
    // HOLLOW_WAND: MuseumItem
    // HOLY_DRAGON: MuseumItem
    // HOTSPOT_HOOK: MuseumItem (no featured_slot)
    // HOTSPOT_RADAR: MuseumItem (no featured_slot)
    // HOTSPOT_SINKER: MuseumItem (no featured_slot)
    // HUNTER_KNIFE: MuseumItem
  10. Reference HypixelSkyBlockMuseum item properties

    The HypixelSkyBlockMuseum interface contains a collection of museum items. Each item entry typically includes metadata about the donation and the item's properties. Common properties across museum items include donated_time (number), items (an object containing data as a string and type as a number), and for certain items, borrowing (boolean) and featured_slot (string).
    // Example structure for a museum item like ANCIENT_CLOAK or ANGLER
    interface MuseumItem {
      borrowing?: boolean;
      donated_time?: number;
      featured_slot?: string;
      items?: {
        data?: string;
        type?: number;
        [k: string]: unknown;
      };
      [k: string]: unknown;
    }
  11. Retrieve booster information using HypixelAPI.getBoosters

    The getBoosters method in the HypixelAPI class retrieves information about active or scheduled boosters. It returns a Promise that resolves to an object containing booster details such as the booster ID, amount, activation date, game type, length, and purchaser UUID. The returned object also includes helper methods like getDateScheduled and a stackedIterator for handling stacked boosters.
    // Example usage of getBoosters
    const boosters = await hypixelApi.getBoosters(raw);
    console.log(boosters._id);
    console.log(boosters.getDateScheduled());