-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathtest.js
More file actions
33 lines (24 loc) · 726 Bytes
/
test.js
File metadata and controls
33 lines (24 loc) · 726 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
var MCServerMessager = require('./lib/MCServerMessager');
var mcsm = new MCServerMessager({
host: "0.0.0.0", // Listen on all interfaces
message: "The server will be up soon. Grab a coffee :P",
players: "0",
maxPlayers: "48",
motd: "Houston, we've got a problem",
//reportedVersion: "1.5.1", //MC client version
//protocolVersion: "60", //MC protocol version
//reportedVersion: "1.6.2",
//protocolVersion: "74",
//reportedVersion: "1.8.3",
//protocolVersion: "47"
});
mcsm.start();
setTimeout(function() {
mcsm.stop();
mcsm.setOption("message", "Just give me five more minutes...");
mcsm.setOption("motd", "Almost up :D");
mcsm.start();
}, 3300000);
setTimeout(function() {
mcsm.stop();
}, 3600000);