mirror of
https://github.com/PrismarineJS/node-minecraft-protocol.git
synced 2025-08-10 21:18:53 -04:00
var -> const/let in examples and tests
This commit is contained in:
parent
4a33bc7ac7
commit
79f82afb91
17 changed files with 185 additions and 297 deletions
examples/server_helloworld
|
@ -1,13 +1,13 @@
|
|||
var mc = require('minecraft-protocol');
|
||||
const mc = require('minecraft-protocol');
|
||||
|
||||
var options = {
|
||||
const options = {
|
||||
'online-mode': true
|
||||
};
|
||||
|
||||
var server = mc.createServer(options);
|
||||
const server = mc.createServer(options);
|
||||
|
||||
server.on('login', function(client) {
|
||||
var addr = client.socket.remoteAddress;
|
||||
const addr = client.socket.remoteAddress;
|
||||
console.log('Incoming connection', '(' + addr + ')');
|
||||
|
||||
client.on('end', function() {
|
||||
|
@ -38,7 +38,7 @@ server.on('login', function(client) {
|
|||
flags: 0x00
|
||||
});
|
||||
|
||||
var msg = {
|
||||
const msg = {
|
||||
translate: 'chat.type.announcement',
|
||||
"with": [
|
||||
'Server',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue