minecraft-motd-parser
v1.0.1
Published
A simple minecraft motd parser. Returns an array of objects with formatting rules, ready to be used as you wish.
Downloads
33
Maintainers
Readme
MOTD parser
var parser = require('minecraft-motd-parser');
var motd = "§00 §11 §22 §33";
parser.parse(motd, function (err, result) {
/* result
* [{rules: {color: "black"}, string: '0 '},
* {rules: {color: "dark-blue"}, string: '1 '},
* {rules: {color: "dark-green"}, string: '2 '},
* {rules: {color: "dark-acqua"}, string: '3'}]
*/
});