Skip to content

Commit ffe912b

Browse files
authored
Export defaultVersion (#984)
* export defaultVersion * added defaultVersion to api documentation
1 parent aac5494 commit ffe912b

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

docs/API.md

+4
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,10 @@ The minecraft protocol states.
325325

326326
The supported minecraft versions.
327327

328+
## mc.defaultVersion
329+
330+
The current default minecraft version.
331+
328332
## mc.createSerializer({ state = states.HANDSHAKING, isServer = false , version})
329333

330334
Returns a minecraft protocol [serializer](https://github.com/roblabla/ProtoDef#serializerprotomaintype) for these parameters.

src/index.d.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,8 @@ declare module 'minecraft-protocol' {
245245
}
246246

247247
export const states: typeof States
248-
export const supportedVersions: ['1.7', '1.8', '1.9', '1.10', '1.11.2', '1.12.2', '1.13.2', '1.14.4', '1.15.2', '1.16.5', '1.17.1']
248+
export const supportedVersions: string[]
249+
export const defaultVersion: string
249250

250251
export function createServer(options: ServerOptions): Server
251252
export function createClient(options: ClientOptions): Client

src/index.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,6 @@ module.exports = {
1515
createSerializer: serializer.createSerializer,
1616
createDeserializer: serializer.createDeserializer,
1717
ping: require('./ping'),
18-
supportedVersions: require('./version').supportedVersions
18+
supportedVersions: require('./version').supportedVersions,
19+
defaultVersion: require('./version').defaultVersion
1920
}

0 commit comments

Comments
 (0)