Scriptingbitchos data¶
This is the part that makes writing a script for this mod worth doing.
bitchos.game() // 'bedwars' | 'skywars' | 'lobby' | null (not on Hypixel)
bitchos.onHypixel()
bitchos.inGame() // a live match, not a pre-game lobby
bitchos.preGame()
bitchos.mode() // 'solo' | 'doubles' | 'trios' | 'squads' | …
bitchos.teamSize()
bitchos.map()
bitchos.ping() // as the HUD shows it
bitchos.pingRaw()
bitchos.packetLoss() // percent
bitchos.jitter() // ms
bitchos.version()
Threat¶
bitchos.threat.lobby() // 0..100, or -1 when nothing has resolved yet
bitchos.threat.unresolved() // how many players have no stats
bitchos.threat.players() // array, worst first
bitchos.threat.tierOf(score) // 'unknown' | 'low' | 'mid' | 'high' | 'extreme'
bitchos.threat.describe(score) // the phrase /bitchos threat prints
Each entry: .name .uuid .score .tier .colour .stats .tag.
A scan reads the tab list and the stats cache. Cheap, but not free and it allocates: do it on a tick and keep the result.
.score is -1 for a player with no stats, not 0
A nick is not a harmless player, and collapsing the two would say that it is.
Stats¶
bitchos.stats.of('Notch') // StatsRef, or null
bitchos.stats.state('Notch') // 'ok' | 'unknown' (not fetched yet) | 'no_data' (a nick)
bitchos.stats.uuidOf('Notch')
bitchos.stats.prewarm('Notch')
of() accepts a name or a 32-character undashed UUID and never blocks: asking starts the lookup and the same call a moment later usually answers. state() is the difference between "ask again" and "stop asking".
A StatsRef has:
.name .rank .level .star .wins .winstreak .fkdr .wlr .kdr .bblr .swWins .swKdr .swWlr .guildTag .guildName
Tags¶
bitchos.tags.of('Notch') // TagRef or null
bitchos.tags.set('Notch', 'cheater', 'note') // false if the name cannot be resolved
bitchos.tags.remove('Notch')
bitchos.tags.all() // your own tags
bitchos.tags.labels()
A TagRef has .uuid .name .label .display .colour .note .updatedAt .shared .others .badge.
.shared matters: your own tag is something you decided, a shared one is somebody else's accusation and .others says how many people agree. See Tags & lists.
Party and teams¶
bitchos.party.members() // array of names
bitchos.party.size()
bitchos.party.has('Notch')
bitchos.teams.all() // Bed Wars teams; empty outside a live match
bitchos.teams.own() // or null
bitchos.teams.enemies()
A team has .colour .name .letter .label .members .bed .alive .self .threat .tier .unknowns .rushable.
.bed is 'up' | 'gone' | 'eliminated' | 'unknown'. Gone and eliminated are different facts; a team with no bed can still kill you.