mirror of
https://github.com/PrismarineJS/node-minecraft-protocol.git
synced 2024-11-28 02:05:40 -05:00
Export defaultVersion (#984)
* export defaultVersion * added defaultVersion to api documentation
This commit is contained in:
parent
aac5494a12
commit
ffe912b2fe
3 changed files with 8 additions and 2 deletions
|
@ -325,6 +325,10 @@ The minecraft protocol states.
|
|||
|
||||
The supported minecraft versions.
|
||||
|
||||
## mc.defaultVersion
|
||||
|
||||
The current default minecraft version.
|
||||
|
||||
## mc.createSerializer({ state = states.HANDSHAKING, isServer = false , version})
|
||||
|
||||
Returns a minecraft protocol [serializer](https://github.com/roblabla/ProtoDef#serializerprotomaintype) for these parameters.
|
||||
|
|
3
src/index.d.ts
vendored
3
src/index.d.ts
vendored
|
@ -245,7 +245,8 @@ declare module 'minecraft-protocol' {
|
|||
}
|
||||
|
||||
export const states: typeof States
|
||||
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']
|
||||
export const supportedVersions: string[]
|
||||
export const defaultVersion: string
|
||||
|
||||
export function createServer(options: ServerOptions): Server
|
||||
export function createClient(options: ClientOptions): Client
|
||||
|
|
|
@ -15,5 +15,6 @@ module.exports = {
|
|||
createSerializer: serializer.createSerializer,
|
||||
createDeserializer: serializer.createDeserializer,
|
||||
ping: require('./ping'),
|
||||
supportedVersions: require('./version').supportedVersions
|
||||
supportedVersions: require('./version').supportedVersions,
|
||||
defaultVersion: require('./version').defaultVersion
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue