Fix Typo in readme example (#129)

* Fix Typo in readme example

* ServerAdvertisement: Fix motd name doc/code inconsistency

* Update advertisement.js

* Update advertisement.js

Co-authored-by: extremeheat <extreme@protonmail.ch>
This commit is contained in:
u9g 2021-08-10 21:17:41 -04:00 committed by GitHub
commit 2d42caafb9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View file

@ -66,7 +66,7 @@ client.on('text', (packet) => { // Listen for chat messages and echo them back.
*Can't connect locally on Windows? See the [faq](docs/FAQ.md)*
```js
const bedrock = require('bedrock-protocol')
const server = new bedrock.createServer({
const server = bedrock.createServer({
host: '0.0.0.0', // optional. host to bind as.
port: 19132, // optional
version: '1.17.10', // optional. The server version, latest if not specified.

View file

@ -12,6 +12,7 @@ class ServerAdvertisement {
serverId = '0'
constructor (obj, version) {
if (obj?.name) obj.motd = obj.name
Object.assign(this, obj)
}