add player-list-text config option, and add missing options in the api.md, fix #180

This commit is contained in:
Romain Beaumont 2016-01-14 01:09:07 +01:00
parent c861ac14b9
commit 029c31fad6
3 changed files with 11 additions and 3 deletions

View file

@ -17,5 +17,9 @@
}, },
"modpe": false, "modpe": false,
"view-distance": 10 "view-distance": 10,
"player-list-text": {
"header":"Flying squid",
"footer":"Test server"
}
} }

View file

@ -226,6 +226,10 @@ Options is an object containing the following properties:
} }
``` ```
* modpe: defaults to false, wether or not modpe should be enabled. * modpe: defaults to false, wether or not modpe should be enabled.
* regionFolder : the region folder of the saved world
* plugins
* view-distance
* player-list-text : an object with keys header and footer, displayed on the player list
### Properties ### Properties

View file

@ -1,4 +1,4 @@
module.exports.player=function(player) module.exports.player=function(player,serv,settings)
{ {
player.playerlistUpdateText = (header, footer) => player.playerlistUpdateText = (header, footer) =>
player._client.write('playerlist_header', { player._client.write('playerlist_header', {
@ -6,5 +6,5 @@ module.exports.player=function(player)
footer: JSON.stringify(footer) footer: JSON.stringify(footer)
}); });
player.playerlistUpdateText("Flying squid", "Test server"); player.playerlistUpdateText(settings["player-list-text"]["header"], settings["player-list-text"]["footer"]);
}; };