File tree 2 files changed +8
-1
lines changed
2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -189,6 +189,9 @@ declare module 'bedrock-protocol' {
189
189
// Only allow one client to connect at a time (default: false)
190
190
forceSinge ?: boolean
191
191
192
+ // Do not disconnect clients on server packet parsing errors and drop the packet instead (default: false)
193
+ omitParseErrors ?: boolean
194
+
192
195
// Dispatched when a new client has logged in, and we need authentication
193
196
// tokens to join the backend server. Cached after the first login.
194
197
// If this is not specified, the client will be disconnected with a login prompt.
Original file line number Diff line number Diff line change @@ -49,7 +49,11 @@ class RelayPlayer extends Player {
49
49
} catch ( e ) {
50
50
this . server . deserializer . dumpFailedBuffer ( packet , this . connection . address )
51
51
console . error ( this . connection . address , e )
52
- this . disconnect ( 'Server packet parse error' )
52
+
53
+ if ( ! this . options . omitParseErrors ) {
54
+ this . disconnect ( 'Server packet parse error' )
55
+ }
56
+
53
57
return
54
58
}
55
59
const name = des . data . name
You can’t perform that action at this time.
0 commit comments