mirror of
https://github.com/PrismarineJS/node-minecraft-protocol.git
synced 2025-05-06 19:30:26 -04:00
Allow minecraft username instead of mojang email
For those accounts that didn't switch to mojang accounts. Fixes #18
This commit is contained in:
parent
6958d1a747
commit
68b478ce35
1 changed files with 2 additions and 2 deletions
4
index.js
4
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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue