mirror of
https://github.com/PrismarineJS/node-minecraft-protocol.git
synced 2024-11-29 18:55:40 -05:00
move getter and setter after the constructor in client.js
This commit is contained in:
parent
bbde23bb02
commit
68c589a3b0
1 changed files with 19 additions and 19 deletions
|
@ -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…
Reference in a new issue