Authentication

Class representing the authentication of a client with Mojang's authentication server

new Authentication(email: string, password: string, client_path: string)
Parameters
email (string) email of Mojang account
password (string) password of Mojang account
client_path (string = <CURRENT_WORKING_DIRECTORY>) path to the file that will store the client
Instance Members
accessToken
name
id
authenticate(game)
refresh()
validate()

Client

Class representing the client

new Client(path: string?)
Parameters
path (string?) A path to the JSON file where the client will be stored
Instance Members
setAccessToken
setName
setId
fileExists()
readFile()
writeFile()

Mojang

a module that contains miscellaneous endpoint wrappers for Mojang APIs

Mojang
Static Members
status()
getUUID(username, timestamp)
getNameHistory(uuid)
getSkin(uuid)

NameHistoryInstance

a container for Minecraft name history instances

NameHistoryInstance

Type: object

Properties
name (string) : The username of the account
changedToAt (number?) : The (java) timestamp the username was changed to the associated username. This value is absent for the original username

TexturesContainer

a container for Minecraft account textures

TexturesContainer

Type: object

Properties
skin (SkinContainer) : Data about a minecraft skin
cape (CapeContainer) : Data about a minecraft cape

SkinContainer

a container for Minecraft skin data

SkinContainer

Type: object

Properties
url (string) : The url to the skin texture
model (string) : The model type of the skin, can be one of the following: normal, slim

CapeContainer

a container for Minecraft cape data

CapeContainer

Type: object

Properties
url (string) : The url to the cape texture

RealmsWorld

a Minecraft world hosted on Minecraft Realms

RealmsWorld

Type: Object

Properties
id (number) : The ID of the world
owner (string) : The owner of the world
ownerUUID (string) : The unique ID of the owner, note: UUID does not have hyphens
name (string) : The name of the world
motd (string) : The MOTD of the server, does not support color
state (string) : The status of the server, can be one of the following: ADMIN_LOCK, CLOSED, OPEN, UNITIALIZED
daysLeft (number) : How many days are left of subscription. Always '0' if not owner and returns '-1' if expired
expired (boolean) : Whether the subscription has expired
expiredTrial (boolean) : Whether the trial subscription has expired
worldType (string) : Type of the world, can be one of the following: NORMAL, MINIGAME, ADVENTUREMAP, EXPERIENCE, INSPIRATION
minigameName (string) : The name of the minigame that is currently active, null if not in a minigame
minigameId (number) : The unique ID of the minigame, null if not in minigame
minigameImage (string) : base64 of the current minigame image in the format PNG, null if not in minigame
activeSlot (number) : Current server world (1-4)

RealmsWorldBackup

a Minecraft Realms world backup

RealmsWorldBackup

Type: Object

Properties
backupId (string) : The ID of the world backup
lastModifiedDate (number) : The timestamp the backup was created
size (number) : The size of the backup
metadata (RealmsWorldBackupMetadata) : Additional data about the backup

RealmsWorldBackupMetadata

a container for additional Minecraft Realms backup data

RealmsWorldBackupMetadata

Type: Object

Properties
game_difficulty (number) : The difficulty set for the world, 0-3. The difficlties are as follows: 0 - Peaceful, 1 - Easy, 2 - Normal, 3 - Hard
name (string) : The name of the world
gameServerVersion (string) : The version of Minecraft when the backup was created
enabledPacks (string)
description (string)
game_mode (number) : The default gamemode of the world
world_type (string) : The type of world generation used

RealmsSubscription

a container for a Minecraft Realms subscription

RealmsSubscription

Type: Object

Properties
startDate (number) : Timestamp of when the subscription was started
daysLeft (number) : Number of days left before the subscription renews, -1 if the subscription is inactive
subscriptionType (string) : The type of subscription, can be one of the following: NORMAL, RECURRING

Realms

Class representing a client connected to Minecraft Realms

new Realms(auth: Authentication)
Parameters
auth (Authentication) a valid authenticated authentication client
Instance Members
getWorlds()
getIP(world)
hasPendingUpdate(world)
getBackups(world)
getDownload(world)
getOPs(world)
getSubscription(world)
getPendingInvites()