bedrock-portal 0.0.10 → 0.1.0
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/package.json +2 -2
- package/src/index.js +5 -5
- package/src/modules.js +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bedrock-portal",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"description": "Creates a joinable session in Minecraft Bedrock Edition that can route players to their a specified host",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"axios": "^1.0.0",
|
|
21
21
|
"uuid": "^9.0.0",
|
|
22
|
-
"xbox-rta": "^0.0.
|
|
22
|
+
"xbox-rta": "^0.0.9"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"bedrock-portal": "file:.",
|
package/src/index.js
CHANGED
|
@@ -214,11 +214,11 @@ module.exports = class BedrockPortal extends EventEmitter {
|
|
|
214
214
|
closed: false,
|
|
215
215
|
},
|
|
216
216
|
custom: {
|
|
217
|
-
hostName: String(this.options.world?.hostName
|
|
218
|
-
worldName: String(this.options.world?.name
|
|
219
|
-
version: String(this.options.world?.version
|
|
220
|
-
MemberCount: Number(this.options.world?.memberCount
|
|
221
|
-
MaxMemberCount: Number(this.options.world?.maxMemberCount
|
|
217
|
+
hostName: String(this.options.world?.hostName || `${this.sessionOwner.gamertag}'s Portal`),
|
|
218
|
+
worldName: String(this.options.world?.name || 'BedrockPortal'),
|
|
219
|
+
version: String(this.options.world?.version || require('../package.json').version),
|
|
220
|
+
MemberCount: Number(this.options.world?.memberCount ?? 0),
|
|
221
|
+
MaxMemberCount: Number(this.options.world?.maxMemberCount ?? 10),
|
|
222
222
|
Joinability: joinability.joinability,
|
|
223
223
|
ownerId: this.sessionOwner.xuid,
|
|
224
224
|
rakNetGUID: genRaknetGUID(),
|
package/src/modules.js
CHANGED
|
@@ -15,8 +15,8 @@ const altCheck = async (api, owner) => {
|
|
|
15
15
|
const autoFriendAdd = async (api) => {
|
|
16
16
|
setInterval(async () => {
|
|
17
17
|
|
|
18
|
-
const friends = await api.get('https://peoplehub.xboxlive.com/users/me/people/social/decoration/details').then(res => res.people.map(e => e.xuid));
|
|
19
|
-
const followers = await api.get('https://peoplehub.xboxlive.com/users/me/people/followers/decoration/details').then(res => res.people);
|
|
18
|
+
const friends = await api.get('https://peoplehub.xboxlive.com/users/me/people/social/decoration/details', { contractVersion: 5 }).then(res => res.people.map(e => e.xuid));
|
|
19
|
+
const followers = await api.get('https://peoplehub.xboxlive.com/users/me/people/followers/decoration/details', { contractVersion: 5 }).then(res => res.people);
|
|
20
20
|
|
|
21
21
|
const needsAdding = followers.filter(res => !friends.includes(res.xuid));
|
|
22
22
|
|