From 68b478ce35ba25c02fe7b5fb33bc677598fb91fb Mon Sep 17 00:00:00 2001 From: Robin Lambertz Date: Sat, 26 Jan 2013 20:00:38 +0000 Subject: [PATCH] Allow minecraft username instead of mojang email For those accounts that didn't switch to mojang accounts. Fixes #18 --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 6fd0f11..2ea887c 100644 --- a/index.js +++ b/index.js @@ -115,9 +115,9 @@ function createClient(options) { var port = options.port || 25565; var host = options.host || 'localhost'; 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 email = options.email; + var email = options.email || options.username; var password = options.password; var client = new Client(false);