mirror of
https://github.com/unmojang/node-minecraft-protocol.git
synced 2025-10-01 07:00:34 -04:00
add an assert
This commit is contained in:
parent
4b0780db66
commit
4237787082
2
index.js
2
index.js
@ -17,7 +17,7 @@ exports.createClient = createClient;
|
|||||||
|
|
||||||
function createClient(options) {
|
function createClient(options) {
|
||||||
// defaults
|
// defaults
|
||||||
options = options || {};
|
assert.ok(options, "options is required");
|
||||||
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");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user