Compare commits
3 commits
master
...
fix-maxpla
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2ea5c27893 |
||
|
|
b4f4202faa |
||
|
|
6b5aa08dba |
2 changed files with 4 additions and 3 deletions
2
index.d.ts
vendored
2
index.d.ts
vendored
|
|
@ -162,7 +162,7 @@ declare module 'bedrock-protocol' {
|
|||
|
||||
constructor(options: Options)
|
||||
|
||||
listen(host?: string, port?: number): Promise<void>
|
||||
listen(): Promise<void>
|
||||
close(disconnectReason?: string): Promise<void>
|
||||
|
||||
on(event: 'connect', cb: (client: Player) => void): any
|
||||
|
|
|
|||
|
|
@ -118,8 +118,9 @@ class Server extends EventEmitter {
|
|||
return this.advertisement
|
||||
}
|
||||
|
||||
async listen (host = this.options.host, port = this.options.port) {
|
||||
this.raknet = new this.RakServer({ host, port }, this)
|
||||
async listen () {
|
||||
const { host, port, maxPlayers } = this.options
|
||||
this.raknet = new this.RakServer({ host, port, maxPlayers }, this)
|
||||
|
||||
try {
|
||||
await this.raknet.listen()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue