PrismarineJS / PrismarineJS/node-minecraft-protocol

Missing type hint for ServerOptions encryption

Open Beginner friendly
#1,503 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

possible bug
Dominant language
JavaScript
Stars
1.4k
Forks
290
Avg merge
4d 8h
Merged PRs (30d)
7

Description

The readme uses encryption in the example which is not defined here

https://github.com/PrismarineJS/node-minecraft-protocol/blob/ee40987dde124cd2f560bb944cfffb29946fef81/src/index.d.ts#L192-L218

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'
})
Image

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The missing declaration is in src/index.d.ts around lines 192-218; compare ServerOptions there with the README hello-world server example. Add the encryption option with the type used by the API, then verify the declaration covers the documented example.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
api
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
78/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.