npm.io
1.6.0 • Published 5 months ago

prismarine-realms

Licence
MIT
Version
1.6.0
Deps
2
Size
79 kB
Vulns
0
Weekly
0
Stars
23

prismarine-realms

NPM version Build Status Discord Try it on gitpod

Minecraft Realm interface for Minecraft Java and Bedrock editions, providing a stable API to start/stop Realms, and obtain Realm information such as connection addresses.

Minecraft Realms is a subscription based service provided by Mojang where users can host, create and manage their own private Minecraft servers.

Installation

npm install prismarine-realms

Usage

RealmAPI
.from(authflow: Authflow, platform: 'bedrock' | 'java', options: Options)

Takes an Authflow instance from prismarine-auth, you can see the documentation for this here.

Example
const { Authflow } = require('prismarine-auth') 
const { RealmAPI } = require('prismarine-realms')

const authflow = new Authflow()

const api = RealmAPI.from(authflow, 'bedrock') // or 'java'

// Returns a list of Realms the authenticating account has joined or owns.
await api.getRealms().then(console.log)

Documentation

See API Documentation

Keywords