From a4c208ec5e911ae7d5bf2ffdb94713b057381ec7 Mon Sep 17 00:00:00 2001 From: Romain Beaumont Date: Sat, 28 Nov 2015 14:12:48 +0100 Subject: [PATCH] fix createMCServer doc --- doc/API.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/doc/API.md b/doc/API.md index 33b7827..50a4874 100644 --- a/doc/API.md +++ b/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