Skip to content

API reference / @jsprismarine/prismarine / about

about ​

Interfaces ​

About ​

Defined in: prismarine/src/about.ts:14

What the server says about itself wherever it states a version.

Properties ​

minecraftVersion ​

readonly minecraftVersion: string

Defined in: prismarine/src/about.ts:20

The newest Minecraft release the server speaks, the one it advertises.

protocols ​

readonly protocols: readonly AboutProtocol[]

Defined in: prismarine/src/about.ts:24

Every protocol version the server speaks, newest first.

protocolVersion ​

readonly protocolVersion: number

Defined in: prismarine/src/about.ts:22

The protocol version the server advertises.

software ​

readonly software: string

Defined in: prismarine/src/about.ts:16

The software name, JSPrismarine.

version ​

readonly version: string

Defined in: prismarine/src/about.ts:18

The software version, without a leading v.


AboutProtocol ​

Defined in: prismarine/src/about.ts:5

One protocol version the server speaks and the Minecraft releases that use it.

Properties ​

advertised ​

readonly advertised: boolean

Defined in: prismarine/src/about.ts:10

Whether this is the protocol the MOTD and query advertise.

minecraftVersions ​

readonly minecraftVersions: readonly string[]

Defined in: prismarine/src/about.ts:8

Minecraft releases on this protocol, in ascending order.

protocolVersion ​

readonly protocolVersion: number

Defined in: prismarine/src/about.ts:6

Functions ​

about() ​

about(): About

Defined in: prismarine/src/about.ts:38

The one place every version surface reads from: the startup log, /version, the server-list MOTD and the query protocol. The software version comes from the build stamp or the package manifest, and the protocols from the codec registry, so a release or a codec added there shows up everywhere at once.

Returns ​

About

The server's software and protocol versions.

Example ​

typescript
const { minecraftVersion, protocolVersion } = about();