Skip to content
This repository was archived by the owner on Nov 15, 2022. It is now read-only.

Commit 061176d

Browse files
committed
run standard
1 parent 85264bc commit 061176d

File tree

12 files changed

+23
-23
lines changed

12 files changed

+23
-23
lines changed

examples/client_custom_auth/client_custom_auth.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ if (!username || !password) {
1111
const client = mc.createClient({
1212
host,
1313
port: parseInt(port),
14-
username: username,
15-
password: password,
14+
username,
15+
password,
1616
sessionServer: '', // URL to your session server proxy that changes the expected result of mojang's seession server to mcleaks expected.
1717
// For more information: https://github.com/PrismarineJS/node-yggdrasil/blob/master/src/Server.js#L19
1818
auth: async (client, options) => {

examples/client_custom_packets/client_custom_packets.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ const client = mc.createClient({
6262
port: parseInt(process.argv[3]),
6363
username: process.argv[4] ? process.argv[4] : 'echo',
6464
password: process.argv[5],
65-
customPackets: customPackets
65+
customPackets
6666
})
6767

6868
client.on('connect', function () {

examples/client_microsoft_auth/client_microsoft_auth.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const client = mc.createClient({
1212
host,
1313
port: parseInt(port),
1414
username: userOrEmail, // your microsoft account email
15-
password: password, // your microsoft account password
15+
password, // your microsoft account password
1616
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.
1717
})
1818

examples/proxy/proxy.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ const srv = mc.createServer({
7373
'online-mode': false,
7474
port: 25566,
7575
keepAlive: false,
76-
version: version
76+
version
7777
})
7878
srv.on('login', function (client) {
7979
const addr = client.socket.remoteAddress
@@ -92,11 +92,11 @@ srv.on('login', function (client) {
9292
if (!endedTargetClient) { targetClient.end('Error') }
9393
})
9494
const targetClient = mc.createClient({
95-
host: host,
96-
port: port,
95+
host,
96+
port,
9797
username: client.username,
9898
keepAlive: false,
99-
version: version
99+
version
100100
})
101101
client.on('packet', function (data, meta) {
102102
if (targetClient.state === states.PLAY && meta.state === states.PLAY) {

examples/server/server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ function broadcast (message, exclude, username) {
7373
client = server.clients[clientId]
7474
if (client !== exclude) {
7575
const msg = {
76-
translate: translate,
76+
translate,
7777
with: [
7878
username,
7979
message

examples/server_ping/ping.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ if (!process.argv[2].includes(':')) { // Spliting ip and port if available.
2020
port = parseInt(port)
2121
}
2222

23-
protocol.ping({ host: host, port: port }, (err, pingResults) => { // Pinging server and getting result
23+
protocol.ping({ host, port }, (err, pingResults) => { // Pinging server and getting result
2424
if (err) throw err
2525
console.log(`${removeColorsFromString(JSON.stringify(pingResults.description.text))}`) // Printing motd to console
2626
// Printing some infos to console

src/browser.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ const Server = require('./server')
55
const serializer = require('./transforms/serializer')
66

77
module.exports = {
8-
Client: Client,
9-
Server: Server,
8+
Client,
9+
Server,
1010
states: require('./states'),
1111
createSerializer: serializer.createSerializer,
1212
createDeserializer: serializer.createDeserializer,

src/client.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ class Client extends EventEmitter {
3939
}
4040

4141
setSerializer (state) {
42-
this.serializer = createSerializer({ isServer: this.isServer, version: this.version, state: state, customPackets: this.customPackets })
42+
this.serializer = createSerializer({ isServer: this.isServer, version: this.version, state, customPackets: this.customPackets })
4343
this.deserializer = createDeserializer({
4444
isServer: this.isServer,
4545
version: this.version,
46-
state: state,
46+
state,
4747
packetsToParse:
4848
this.packetsToParse,
4949
customPackets: this.customPackets,

src/client/pluginChannels.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ module.exports = function (client, options) {
6666
function writeChannel (channel, params) {
6767
debug('write custom payload ' + channel + ' ' + params)
6868
client.write('custom_payload', {
69-
channel: channel,
69+
channel,
7070
data: proto.createPacketBuffer(channel, params)
7171
})
7272
}

src/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ const createClient = require('./createClient')
77
const createServer = require('./createServer')
88

99
module.exports = {
10-
createClient: createClient,
11-
createServer: createServer,
12-
Client: Client,
13-
Server: Server,
10+
createClient,
11+
createServer,
12+
Client,
13+
Server,
1414
states: require('./states'),
1515
createSerializer: serializer.createSerializer,
1616
createDeserializer: serializer.createDeserializer,

0 commit comments

Comments
 (0)