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:
parent
2f941335f6
commit
2d42caafb9
2 changed files with 2 additions and 1 deletions
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ class ServerAdvertisement {
|
|||
serverId = '0'
|
||||
|
||||
constructor (obj, version) {
|
||||
if (obj?.name) obj.motd = obj.name
|
||||
Object.assign(this, obj)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue