mirror of
https://github.com/danbulant/flying-squid
synced 2026-06-20 23:11:21 +00:00
add player-list-text config option, and add missing options in the api.md, fix #180
This commit is contained in:
parent
c861ac14b9
commit
029c31fad6
3 changed files with 11 additions and 3 deletions
|
|
@ -17,5 +17,9 @@
|
|||
|
||||
},
|
||||
"modpe": false,
|
||||
"view-distance": 10
|
||||
"view-distance": 10,
|
||||
"player-list-text": {
|
||||
"header":"Flying squid",
|
||||
"footer":"Test server"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -226,6 +226,10 @@ Options is an object containing the following properties:
|
|||
}
|
||||
```
|
||||
* 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
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
module.exports.player=function(player)
|
||||
module.exports.player=function(player,serv,settings)
|
||||
{
|
||||
player.playerlistUpdateText = (header, footer) =>
|
||||
player._client.write('playerlist_header', {
|
||||
|
|
@ -6,5 +6,5 @@ module.exports.player=function(player)
|
|||
footer: JSON.stringify(footer)
|
||||
});
|
||||
|
||||
player.playerlistUpdateText("Flying squid", "Test server");
|
||||
player.playerlistUpdateText(settings["player-list-text"]["header"], settings["player-list-text"]["footer"]);
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue