@baipiaodajun/mcbots 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -7,7 +7,16 @@
|
|
|
7
7
|
```
|
|
8
8
|
process.env.SERVERS_JSON='[{"host":"mc-yy.io","port":25565,"minBots":1,"maxBots":3,"version":"1.20.1"},{"host":"mc-xx.io","port":25565,"minBots":1,"maxBots":3,"version":"1.20.1"}]';
|
|
9
9
|
|
|
10
|
-
const
|
|
10
|
+
const { initialize, shutdown } = require('@baipiaodajun/mcbots');
|
|
11
|
+
|
|
12
|
+
initialize().then(() => {
|
|
13
|
+
console.log('mcbots start successed');
|
|
14
|
+
}).catch(err => {
|
|
15
|
+
console.error('mcbots start fail:', err);
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
process.on('SIGINT', shutdown);
|
|
19
|
+
process.on('SIGTERM', shutdown);
|
|
11
20
|
```
|
|
12
21
|
|
|
13
22
|
再新建一个package.json,内容如下:
|