Skip to content

Objects

PEMapModder edited this page Aug 30, 2015 · 10 revisions

This page lists the structures of the objects used in the API.

Note that some values would be set to null if the access to view it is blocked from the user authenticated with BA, or from public view if BA is absent.

Note: if the name of a field is in the format a.b, that means that the object has a field called a, which is an object that contains a field called b.

Player

Name Type Description
uid number user ID
name string username in lowercase
nicks Array an array of case-sensitively-distinct names of the user
lastIp string last IP address authenticated with
histIp Array an array of IP addresses authenticated with
status number status of the user - 0 for offline, 1 for online, 2 for transferring
lastServer object (Server) or null the server the user last went on or null
lastSession number the game type of the server the user last went on
authUuid string the last UUID the user authenticated with
coins number the coins balance of the user. It can be negative and/or decimal.
registration number the Unix timestamp when the user was registered
lastOnline number the Unix timestamp when the user was last online
onlineTime number the number of seconds the user has been online
config object (PlayerConfig) a bitmask of the user's settings
label object (Label) the custom label the user wants to use
skin string the hexadecimal representation of the user's face skin (an RGBA map)
lastGrind number the Unix timestamp when the user last used coin grinding
rank object (Rank) a bitmask of the user's rank and permissions
warningPoints number the number of warning points the user has received
lastWarn number the Unix timestamp when the user was last warned (default 0)
team object (Team) the team of the user
teamRank number the user's rank in the team
teamJoinTime number the Unix timestamp when the user joined the team
teamPoints number the number of team points the user has earned for the team
ignoring Array an array of user IDs the user is ignoring (if BA authenticates the client as a normal user not equal to this Player, the array will be empty or the BA client's user ID)
email string the email the user claims to use
friends Array <object (Relation)> an array of Relations used by GitHub
pvpStats object (PvpStats) PvP (Classic PvP + Kit PvP) statistics
spleefStats object (SpleefStats) Spleef statistics
parkourStats object (ParkourStats) Parkour statistics

Relation

Name Type Description
myUid number the user ID for the user considered as "me" (the Player that owns this object)
hisUid number the user ID for the user considered as "the target"
level number the current level between the two users
requestedLevel number the requested friend level between the two users; same as level if there is no request
isOut boolean indicates if the requested level is requested by "me" or "the target"; value is not determined if there is no request

PvpStats

Name Type Description
kills number the number of kills
deaths number the number of deaths
maxStreak number the maximum number of kill streaks the user ever had

Server

Name Type Description
ip string IPv4 address (e.g. 127.0.0.1 or example.com)
port number port number ranging from 0 to 65535

PlayerConfig

Name Type Description
autoAuthMethod number methods for automatic authentication
isTagOn boolean whether the user tag would be displayed
isStatsPublic boolean whether the user's statistics are open to public access
isTeamChannelOn boolean whether the user is listening to team chat
isLocalChannelOn boolean whether the user is listening to local chat
isClassChannelOn boolean whether the user is listening to class chat

Label

Name Type Description
lid number label ID
value string the value of the label
approved number the approval status
staffInCharge string OR null the name of staff in charge, or null

Rank

Name Type Description
isDonator boolean whether the user is Donator
isVIP boolean whether the user is VIP
isModerator boolean whether the user is Moderator
isAdmin boolean whether the user is Admin
isOwner boolean whether the user is Owner
canEval boolean whether the user can Eval
canBuild boolean whether the user can Build
canSpam boolean whether the user can Spam
canAFK boolean whether the user can AFK
isYoutuber boolean whether the user is Youtuber

Team

Name Type Description
tid number team ID
name string team name
requirements string team requirements
rules string team rules
description string team description
standalonePoints number team points owned by the team
totalPoints number team points including player team points
founderUid number the user ID of the founder of the team
isOpen boolean whether the team is open

TODO: Kit, KitEntry, Purchase, ServerStatus, SpleefStats

Clone this wiki locally