Starboard Documentation
website·Indexed 29 days ago
https://starboard.ecr.devDocumentation 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.
What's inside Starboard
- 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.
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.Overview of @mcsb/cli
@mcsb/cli is a command line tool designed to spin up a customizable backend specifically for Minecraft mods.Fetch public resource endpoints with HypixelResources
The
HypixelResourcesclass 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,
HypixelResourcesfetches 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 byHypixelResourcesOptions.refreshIntervaland operates independently of theHttpClientcache policy.HypixelGuild Interface Reference
TheHypixelGuildinterface 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; }Retrieve Hypixel booster information using HypixelAPI.getBoosters
ThegetBoostersmethod of theHypixelAPIclass 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 methodsgetDateScheduledto retrieve the scheduled date andstackedIteratorfor iterating over stacked boosters.// Example usage of getBoosters const boosters = await hypixelAPI.getBoosters(); console.log(boosters._id); console.log(boosters.getDateScheduled());Use RateLimitDeferPolicy to manage HTTP rate limits
TheRateLimitDeferPolicyclass implementsIDeferPolicyand 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.HypixelAchievements interface property definitions
TheHypixelAchievementsinterface 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; }; }Reference HypixelSkyBlockMuseum item properties
TheHypixelSkyBlockMuseuminterface contains properties for various museum items. Most items follow a consistent structure containing metadata about the donation and the item itself. Common properties includeborrowing(boolean),donated_time(number),featured_slot(string), and anitemsobject containingdata(string) andtype(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: MuseumItemReference HypixelSkyBlockMuseum item properties
TheHypixelSkyBlockMuseuminterface 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 includedonated_time(number),items(an object containingdataas a string andtypeas a number), and for certain items,borrowing(boolean) andfeatured_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; }Retrieve booster information using HypixelAPI.getBoosters
ThegetBoostersmethod in theHypixelAPIclass 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 likegetDateScheduledand astackedIteratorfor handling stacked boosters.// Example usage of getBoosters const boosters = await hypixelApi.getBoosters(raw); console.log(boosters._id); console.log(boosters.getDateScheduled());Use the SKYWARS game mode property in HypixelGames
TheSKYWARSproperty in theHypixelGamesinterface is an optional object used to store metadata about the SkyWars game mode. It includes an index signature allowing for arbitrary string keys.interface SkyWars { [k: string]: unknown; }