mirror of
https://github.com/unmojang/node-minecraft-protocol.git
synced 2025-09-28 05:35:56 -04:00
move getter and setter after the constructor in client.js
This commit is contained in:
parent
bbde23bb02
commit
68c589a3b0
@ -24,25 +24,6 @@ class Client extends EventEmitter
|
||||
deserializer;
|
||||
isServer;
|
||||
|
||||
get state(){
|
||||
return this.serializer.protocolState;
|
||||
}
|
||||
|
||||
set state(newProperty) {
|
||||
var oldProperty = this.serializer.protocolState;
|
||||
this.serializer.protocolState = newProperty;
|
||||
this.deserializer.protocolState = newProperty;
|
||||
this.emit('state', newProperty, oldProperty);
|
||||
}
|
||||
|
||||
get compressionThreshold() {
|
||||
return this.compressor == null ? -2 : this.compressor.compressionThreshold;
|
||||
}
|
||||
|
||||
set compressionThreshold(threshold) {
|
||||
this.setCompressionThreshold(threshold);
|
||||
}
|
||||
|
||||
constructor(isServer) {
|
||||
super();
|
||||
|
||||
@ -65,6 +46,25 @@ class Client extends EventEmitter
|
||||
});
|
||||
}
|
||||
|
||||
get state(){
|
||||
return this.serializer.protocolState;
|
||||
}
|
||||
|
||||
set state(newProperty) {
|
||||
var oldProperty = this.serializer.protocolState;
|
||||
this.serializer.protocolState = newProperty;
|
||||
this.deserializer.protocolState = newProperty;
|
||||
this.emit('state', newProperty, oldProperty);
|
||||
}
|
||||
|
||||
get compressionThreshold() {
|
||||
return this.compressor == null ? -2 : this.compressor.compressionThreshold;
|
||||
}
|
||||
|
||||
set compressionThreshold(threshold) {
|
||||
this.setCompressionThreshold(threshold);
|
||||
}
|
||||
|
||||
setSocket(socket) {
|
||||
var ended = false;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user