diff --git a/examples/client_custom_auth/client_custom_auth.js b/examples/client_custom_auth/client_custom_auth.js index 0544497..263da09 100644 --- a/examples/client_custom_auth/client_custom_auth.js +++ b/examples/client_custom_auth/client_custom_auth.js @@ -11,8 +11,8 @@ if (!username || !password) { const client = mc.createClient({ host, port: parseInt(port), - username: username, - password: password, + username, + password, sessionServer: '', // URL to your session server proxy that changes the expected result of mojang's seession server to mcleaks expected. // For more information: https://github.com/PrismarineJS/node-yggdrasil/blob/master/src/Server.js#L19 auth: async (client, options) => { diff --git a/examples/client_custom_packets/client_custom_packets.js b/examples/client_custom_packets/client_custom_packets.js index 3c29d65..998dd99 100644 --- a/examples/client_custom_packets/client_custom_packets.js +++ b/examples/client_custom_packets/client_custom_packets.js @@ -62,7 +62,7 @@ const client = mc.createClient({ port: parseInt(process.argv[3]), username: process.argv[4] ? process.argv[4] : 'echo', password: process.argv[5], - customPackets: customPackets + customPackets }) client.on('connect', function () { diff --git a/examples/client_microsoft_auth/client_microsoft_auth.js b/examples/client_microsoft_auth/client_microsoft_auth.js index 01eebe8..a96d591 100644 --- a/examples/client_microsoft_auth/client_microsoft_auth.js +++ b/examples/client_microsoft_auth/client_microsoft_auth.js @@ -12,7 +12,7 @@ const client = mc.createClient({ host, port: parseInt(port), username: userOrEmail, // your microsoft account email - password: password, // your microsoft account password + password, // your microsoft account password auth: 'microsoft' // This option must be present and set to 'microsoft' to use Microsoft Account Authentication. Failure to do so will result in yggdrasil throwing invalid account information. }) diff --git a/examples/proxy/proxy.js b/examples/proxy/proxy.js index 499c4a5..c683555 100644 --- a/examples/proxy/proxy.js +++ b/examples/proxy/proxy.js @@ -73,7 +73,7 @@ const srv = mc.createServer({ 'online-mode': false, port: 25566, keepAlive: false, - version: version + version }) srv.on('login', function (client) { const addr = client.socket.remoteAddress @@ -92,11 +92,11 @@ srv.on('login', function (client) { if (!endedTargetClient) { targetClient.end('Error') } }) const targetClient = mc.createClient({ - host: host, - port: port, + host, + port, username: client.username, keepAlive: false, - version: version + version }) client.on('packet', function (data, meta) { if (targetClient.state === states.PLAY && meta.state === states.PLAY) { diff --git a/examples/server/server.js b/examples/server/server.js index 59a6bc8..4604c87 100644 --- a/examples/server/server.js +++ b/examples/server/server.js @@ -73,7 +73,7 @@ function broadcast (message, exclude, username) { client = server.clients[clientId] if (client !== exclude) { const msg = { - translate: translate, + translate, with: [ username, message diff --git a/examples/server_ping/ping.js b/examples/server_ping/ping.js index df68e89..d0973fc 100644 --- a/examples/server_ping/ping.js +++ b/examples/server_ping/ping.js @@ -20,7 +20,7 @@ if (!process.argv[2].includes(':')) { // Spliting ip and port if available. port = parseInt(port) } -protocol.ping({ host: host, port: port }, (err, pingResults) => { // Pinging server and getting result +protocol.ping({ host, port }, (err, pingResults) => { // Pinging server and getting result if (err) throw err console.log(`${removeColorsFromString(JSON.stringify(pingResults.description.text))}`) // Printing motd to console // Printing some infos to console diff --git a/src/browser.js b/src/browser.js index 4c01b24..d51f98b 100644 --- a/src/browser.js +++ b/src/browser.js @@ -5,8 +5,8 @@ const Server = require('./server') const serializer = require('./transforms/serializer') module.exports = { - Client: Client, - Server: Server, + Client, + Server, states: require('./states'), createSerializer: serializer.createSerializer, createDeserializer: serializer.createDeserializer, diff --git a/src/client.js b/src/client.js index 03e2c9b..4146d6b 100644 --- a/src/client.js +++ b/src/client.js @@ -39,11 +39,11 @@ class Client extends EventEmitter { } setSerializer (state) { - this.serializer = createSerializer({ isServer: this.isServer, version: this.version, state: state, customPackets: this.customPackets }) + this.serializer = createSerializer({ isServer: this.isServer, version: this.version, state, customPackets: this.customPackets }) this.deserializer = createDeserializer({ isServer: this.isServer, version: this.version, - state: state, + state, packetsToParse: this.packetsToParse, customPackets: this.customPackets, diff --git a/src/client/pluginChannels.js b/src/client/pluginChannels.js index 7988de3..fde8a96 100644 --- a/src/client/pluginChannels.js +++ b/src/client/pluginChannels.js @@ -66,7 +66,7 @@ module.exports = function (client, options) { function writeChannel (channel, params) { debug('write custom payload ' + channel + ' ' + params) client.write('custom_payload', { - channel: channel, + channel, data: proto.createPacketBuffer(channel, params) }) } diff --git a/src/index.js b/src/index.js index 3453410..2e861a5 100644 --- a/src/index.js +++ b/src/index.js @@ -7,10 +7,10 @@ const createClient = require('./createClient') const createServer = require('./createServer') module.exports = { - createClient: createClient, - createServer: createServer, - Client: Client, - Server: Server, + createClient, + createServer, + Client, + Server, states: require('./states'), createSerializer: serializer.createSerializer, createDeserializer: serializer.createDeserializer, diff --git a/src/transforms/encryption.js b/src/transforms/encryption.js index 00a8201..75383df 100644 --- a/src/transforms/encryption.js +++ b/src/transforms/encryption.js @@ -49,6 +49,6 @@ class Decipher extends Transform { } module.exports = { - createCipher: createCipher, - createDecipher: createDecipher + createCipher, + createDecipher } diff --git a/src/transforms/serializer.js b/src/transforms/serializer.js index fb154ba..4985bb0 100644 --- a/src/transforms/serializer.js +++ b/src/transforms/serializer.js @@ -46,6 +46,6 @@ function createDeserializer ({ state = states.HANDSHAKING, isServer = false, ver } module.exports = { - createSerializer: createSerializer, - createDeserializer: createDeserializer + createSerializer, + createDeserializer }