The readme uses encryption in the example which is not defined here
|
export interface ServerOptions { |
|
port?: number |
|
host?: string |
|
kickTimeout?: number |
|
checkTimeoutInterval?: number |
|
'online-mode'?: boolean |
|
beforePing?: (response: any, client: Client, callback?: (error: any, result: any) => any) => any |
|
beforeLogin?: (client: Client) => void |
|
motd?: string |
|
motdMsg?: Object |
|
maxPlayers?: number |
|
keepAlive?: boolean |
|
version?: string | false |
|
fallbackVersion?: string |
|
favicon?: string |
|
customPackets?: any |
|
errorHandler?: (client: Client, error: Error) => void |
|
hideErrors?: boolean |
|
agent?: Agent |
|
validateChannelProtocol?: boolean |
|
/** (1.19+) Require connecting clients to have chat signing support enabled */ |
|
enforceSecureProfile?: boolean |
|
/** 1.19.1 & 1.19.2 only: If client should send previews of messages they are typing to the server */ |
|
enableChatPreview?: boolean |
|
socketType?: 'tcp' | 'ipc' |
|
Server?: Server |
|
} |
https://github.com/PrismarineJS/node-minecraft-protocol/tree/ee40987dde124cd2f560bb944cfffb29946fef81#hello-world-server-example
const mc = require('minecraft-protocol')
const nbt = require('prismarine-nbt')
const server = mc.createServer({
'online-mode': true, // optional
encryption: true, // optional
host: '0.0.0.0', // optional
port: 25565, // optional
version: '1.18'
})

The readme uses encryption in the example which is not defined here
node-minecraft-protocol/src/index.d.ts
Lines 192 to 218 in ee40987
https://github.com/PrismarineJS/node-minecraft-protocol/tree/ee40987dde124cd2f560bb944cfffb29946fef81#hello-world-server-example