Lookup reference¶
How lookups behave, what they cost and when a script asks first: Looking up players.
In every call, who is a player's name or UUID (with or without dashes), and cb is a function that receives one reply.
fkdr.hypixel¶
fkdr.hypixel.player(who, cb) // stats and the full player object
fkdr.hypixel.status(who, cb) // online, and what they are playing
fkdr.hypixel.guild(who, cb) // the guild this player is in
fkdr.hypixel.recentGames(who, cb) // their last games
fkdr.hypixel.get(path, params, cb) // any answer on the list below
fkdr.hypixel.hasKey() // true when you have set a Hypixel key
fkdr.hypixel.permission() // 'own' | 'allowed' | 'denied' | 'ask'
fkdr.hypixel.queued() // this script's lookups still waiting to be sent
fkdr.hypixel.paths() // the paths get() accepts
| call | fills in | r.json |
|---|---|---|
player |
uuid, name, stats |
Hypixel's player object |
status |
online, gameType, mode, map |
Hypixel's session object |
guild |
inGuild, guildName, guildTag, guildMembers |
Hypixel's guild object, or null when they are in none |
recentGames |
uuid |
the list of games itself, newest first |
get |
Hypixel's whole answer |
status and recentGames only show what the player allows in their own Hypixel settings. A player who hides them comes back with online false and no games.
get: other Hypixel answers¶
fkdr.hypixel.get('guild', { name: 'Some Guild' }, function (r) { /* r.json.guild */ });
fkdr.hypixel.get('skyblock/bazaar', {}, function (r) { /* r.json.products */ });
path is written without the address or version ('guild', '/v2/guild' and 'guild/' are the same). params is an object, and can be left out when there are none (get('counts', cb)). A player parameter takes a UUID, not a name: look the name up with player first and use r.uuid.
Only these paths are accepted. Anything else answers bad_request. All of them only read.
| path | parameters | needs your key |
|---|---|---|
player |
uuid |
yes |
status |
uuid |
yes |
recentgames |
uuid |
yes |
guild |
one of player (a UUID), id, name |
yes |
counts, leaderboards, punishmentstats, boosters |
none | yes |
housing/active |
none | yes |
housing/house |
house |
yes |
housing/houses |
player |
yes |
skyblock/news |
none | yes |
skyblock/profiles, skyblock/bingo |
uuid |
yes |
skyblock/profile, skyblock/museum, skyblock/garden |
profile |
yes |
skyblock/auction |
one of uuid, player, profile |
yes |
skyblock/auctions |
page (optional) |
no |
skyblock/auctions_ended, skyblock/bazaar, skyblock/firesales |
none | no |
resources/… (games, achievements, challenges, quests, guilds/achievements, vanity/pets, vanity/companions, skyblock/collections, skyblock/skills, skyblock/items, skyblock/election, skyblock/bingo) |
none | no |
fkdr.hypixel.paths() returns this list from the build you are running, which is the one to trust.
fkdr.urchin¶
fkdr.urchin.player(who, cb) // tags, flagged, reason
fkdr.urchin.hasKey()
fkdr.urchin.permission() // 'own' | 'allowed' | 'denied' | 'ask'
fkdr.urchin.queued()
r.tags is an array of tag types (for example 'cheating' or 'sniping'), empty when the player has none. r.flagged is true when there is at least one. r.reason is the first reason given.
fkdr.aurora¶
fkdr.aurora.player(who, cb) // stats
fkdr.aurora.ping(who, cb) // r.number('avg'), 'recent', 'samples'
fkdr.aurora.winstreak(who, cb) // r.number('overall'), 'solo', 'doubles', 'threes', 'fours'
fkdr.aurora.queued()
Aurora needs no key and never asks. Its copy of a player can be some time old: r.asOf says when it was taken.
The reply¶
| field | what it is |
|---|---|
ok |
true when the lookup worked |
code |
'ok' or one of the codes below |
message |
a sentence for the player, when ok is false |
status |
the service's own answer code (200, 404 …), or 0 when nothing was sent |
json |
the answer as a plain object (see each call above), or null |
uuid, name |
the player looked up, when the answer names one |
cached |
true when the answer came from memory instead of a new request |
waited |
how long the lookup waited in your script's line, in milliseconds |
retryIn |
after too_many or busy: milliseconds to wait before asking again |
stats |
.star .fkdr .wlr .kdr .bblr .wins .winstreak .level .rank, or null |
inGuild, guildName, guildTag, guildMembers |
from guild |
online, gameType, mode, map |
from status |
tags, flagged, reason |
from Urchin |
asOf |
from Aurora: when its copy was taken (milliseconds since 1970), 0 when it is live or unknown |
number(key) |
a number from Aurora's ping and winstreak answers |
stats is worked out the same way fkdr's own overlay does it, so a script's star and FKDR always match what the tab list shows. A field that does not apply to the call is empty ('', 0, false or null).
Codes¶
| code | what happened | what to do |
|---|---|---|
ok |
it worked | |
no_key |
you have not set a key for this service | set one in Configs → api keys |
bad_key |
the service did not accept your key | check the key, or make a new one |
waiting |
a shared script is waiting for your answer | allow or deny it in the Scripts tab (how) |
denied |
you said no to this script for this service | take it back on the script's page if you change your mind |
not_found |
no such player or guild | |
bad_request |
a path that is not on the list, or a parameter that is missing or the wrong shape | |
too_many |
this script asked for much more than its pace allows | wait r.retryIn milliseconds |
busy |
the service is not answering right now, or is paused | wait r.retryIn milliseconds |
The tab list¶
Every player row in the tab list, without the decorative rows some servers add. Use it to go through a whole lobby, including players who are too far away to be loaded. See Player, world, entities.
In Java scripts¶
Java scripts have the same lookups as classes of the same names: hypixel, urchin and aurora. Fields are read as methods.
void onLoad() {
hypixel.player("Notch", r -> {
if (!r.ok()) { client.print("&c" + r.message()); return; }
client.print("&7" + r.star() + " stars, " + r.fkdr() + " FKDR"
+ (r.inGuild() ? ", guild " + r.guildName() : ""));
});
}
The reply has r.ok(), r.code(), r.message(), r.json(), r.star(), r.fkdr(), r.wlr(), r.inGuild(), r.guildName(), r.guildTag(), r.online(), r.tags(), r.flagged(), r.ping(), r.waited() and the rest of the fields above, under the same names.