mirror of
https://github.com/danbulant/flying-squid
synced 2026-06-17 21:41:06 +00:00
fix createMCServer doc
This commit is contained in:
parent
8f7185773d
commit
a4c208ec5e
1 changed files with 13 additions and 13 deletions
26
doc/API.md
26
doc/API.md
|
|
@ -152,26 +152,26 @@ See [prismarine-entity](https://github.com/PrismarineJS/prismarine-entity)
|
|||
Create and return an instance of the class MCServer.
|
||||
Options is an object containing the following properties:
|
||||
|
||||
```
|
||||
port: default to 25565
|
||||
host: default to localhost
|
||||
kickTimeout: default to 10*1000 (10s), kick client that doesn't answer to keepalive after that time
|
||||
checkTimeoutInterval: defaults to 4*1000 (4s), send keepalive packet at that period
|
||||
online-mode: defaults to true
|
||||
beforePing: allow customisation of the answer to ping the server does. It takes a function with argument response and client, response is the default json response, and client is client who sent a ping. It can take as third argument a callback. If the callback is passed, the function should pass its result to the callback, if not it should return.
|
||||
motd: the string that players see when looking for the server. Defaults to "A Minecraft server"
|
||||
maxPlayers: the amount of players on the server. Defaults to 20
|
||||
logging: defaults to true, enables logging
|
||||
gameMode: defaults to 0, 0 is survival 1 is creative.
|
||||
generation: is an object. contains the name and the options for the generator. example:
|
||||
* port: default to 25565
|
||||
* host: default to localhost
|
||||
* kickTimeout: default to 10*1000 (10s), kick client that doesn't answer to keepalive after that time
|
||||
* checkTimeoutInterval: defaults to 4*1000 (4s), send keepalive packet at that period
|
||||
* online-mode: defaults to true
|
||||
* beforePing: allow customisation of the answer to ping the server does. It takes a function with argument response and client, response is the default json response, and client is client who sent a ping. It can take as third argument a callback. If the callback is passed, the function should pass its result to the callback, if not it should return.
|
||||
* motd: the string that players see when looking for the server. Defaults to "A Minecraft server"
|
||||
* maxPlayers: the amount of players on the server. Defaults to 20
|
||||
* logging: defaults to true, enables logging
|
||||
* gameMode: defaults to 0, 0 is survival 1 is creative.
|
||||
* generation: is an object. contains the name and the options for the generator. example:
|
||||
```json
|
||||
{
|
||||
"name":"diamond_square",
|
||||
"options":{
|
||||
"worldHeight":80
|
||||
}
|
||||
}
|
||||
modpe: defaults to false, wether or not modpe should be enabled.
|
||||
```
|
||||
* modpe: defaults to false, wether or not modpe should be enabled.
|
||||
|
||||
### Properties
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue