run standard

This commit is contained in:
Romain Beaumont 2022-11-11 22:24:15 +00:00
parent 85264bcb95
commit 061176d377
12 changed files with 23 additions and 23 deletions

View file

@ -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) => {

View file

@ -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 () {

View file

@ -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.
})

View file

@ -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) {

View file

@ -73,7 +73,7 @@ function broadcast (message, exclude, username) {
client = server.clients[clientId]
if (client !== exclude) {
const msg = {
translate: translate,
translate,
with: [
username,
message

View file

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

View file

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

View file

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

View file

@ -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)
})
}

View file

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

View file

@ -49,6 +49,6 @@ class Decipher extends Transform {
}
module.exports = {
createCipher: createCipher,
createDecipher: createDecipher
createCipher,
createDecipher
}

View file

@ -46,6 +46,6 @@ function createDeserializer ({ state = states.HANDSHAKING, isServer = false, ver
}
module.exports = {
createSerializer: createSerializer,
createDeserializer: createDeserializer
createSerializer,
createDeserializer
}