fix createMCServer doc

This commit is contained in:
Romain Beaumont 2015-11-28 14:12:48 +01:00
parent 8f7185773d
commit a4c208ec5e

View file

@ -152,26 +152,26 @@ See [prismarine-entity](https://github.com/PrismarineJS/prismarine-entity)
Create and return an instance of the class MCServer. Create and return an instance of the class MCServer.
Options is an object containing the following properties: Options is an object containing the following properties:
``` * port: default to 25565
port: default to 25565 * host: default to localhost
host: default to localhost * kickTimeout: default to 10*1000 (10s), kick client that doesn't answer to keepalive after that time
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
checkTimeoutInterval: defaults to 4*1000 (4s), send keepalive packet at that period * online-mode: defaults to true
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.
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"
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
maxPlayers: the amount of players on the server. Defaults to 20 * logging: defaults to true, enables logging
logging: defaults to true, enables logging * gameMode: defaults to 0, 0 is survival 1 is creative.
gameMode: defaults to 0, 0 is survival 1 is creative. * generation: is an object. contains the name and the options for the generator. example:
generation: is an object. contains the name and the options for the generator. example: ```json
{ {
"name":"diamond_square", "name":"diamond_square",
"options":{ "options":{
"worldHeight":80 "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 ### Properties