Allow minecraft username instead of mojang email

For those accounts that didn't switch to mojang accounts. Fixes 
This commit is contained in:
Robin Lambertz 2013-01-26 20:00:38 +00:00
parent 6958d1a747
commit 68b478ce35

View file

@ -115,9 +115,9 @@ function createClient(options) {
var port = options.port || 25565; var port = options.port || 25565;
var host = options.host || 'localhost'; var host = options.host || 'localhost';
assert.ok(options.username, "username is required"); assert.ok(options.username, "username is required");
var haveCredentials = options.email && options.password; var haveCredentials = typeof options.password !== "undefined";
var keepAlive = options.keepAlive == null ? true : options.keepAlive; var keepAlive = options.keepAlive == null ? true : options.keepAlive;
var email = options.email; var email = options.email || options.username;
var password = options.password; var password = options.password;
var client = new Client(false); var client = new Client(false);