var -> const/let in examples and tests

This commit is contained in:
Romain Beaumont 2017-07-13 14:03:52 +02:00
parent 4a33bc7ac7
commit 79f82afb91
No known key found for this signature in database
GPG key ID: DB60E388B3BCF286
17 changed files with 185 additions and 297 deletions
examples/server_helloworld

View file

@ -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',