Update basicServer example to 1.19.80 (#399)

This commit is contained in:
kinash 2023-05-20 15:00:52 +02:00 committed by GitHub
commit cd0ddc16e1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3,7 +3,7 @@ const bedrock = require('bedrock-protocol')
const server = bedrock.createServer({
host: '0.0.0.0', // optional
port: 19132, // optional
version: '1.17.10', // The server version
version: '1.19.80', // The server version
motd: { // The message of the day
motd: 'Funtime Server',
levelName: 'Wonderland'
@ -12,7 +12,7 @@ const server = bedrock.createServer({
server.on('connect', client => {
client.on('join', () => { // The client has joined the server.
const d = new Date() // Once client is in the server, send a colorful kick message
client.disconnect(`Good ${d.getHours() < 12 ? '§emorning§r' : '§3afternoon§r'} :)\n\nMy time is ${d.toLocaleString()} !`)
const date = new Date() // Once client is in the server, send a colorful kick message
client.disconnect(`Good ${date.getHours() < 12 ? '§emorning§r' : '§3afternoon§r'}\n\nMy time is ${date.toLocaleString()} !`)
})
})