bedrock-portal 0.1.0 → 0.1.1

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 CHANGED
@@ -36,15 +36,19 @@ const { BedrockPortal } = require('bedrock-portal');
36
36
  const { Authflow, Titles } = require('prismarine-auth');
37
37
 
38
38
  const main = async () => {
39
- const auth = new Authflow('example', './', { authTitle: Titles.MinecraftNintendoSwitch, deviceType: 'Nintendo' });
39
+ const auth = new Authflow('example', './', { authTitle: Titles.MinecraftNintendoSwitch, deviceType: 'Nintendo' });
40
+
41
+ const session = new BedrockPortal(auth, {
42
+ ip: 'geyserconnect.net', // The server IP & port to redirect players to
43
+ port: 19132,
44
+ joinability: 'friends_of_friends', // The joinability of the session. Can be 'friends_of_friends', 'friends_only', 'invite_only'
45
+ });
46
+
47
+ await session.start();
48
+
49
+ // accepts a player's gamertag or xuid
50
+ await session.invitePlayer('p3')
40
51
 
41
- const session = new BedrockPortal(auth, {
42
- ip: 'geyserconnect.net', // The server IP & port to redirect players to
43
- port: 19132,
44
- joinability: 'friends_of_friends', // The joinability of the session. Can be 'friends_of_friends', 'friends_only', 'invite_only'
45
- });
46
-
47
- await session.start();
48
52
  };
49
53
 
50
54
  main();
@@ -56,10 +60,10 @@ Modules are used to extend the functionality of the BedrockPortal class. You can
56
60
 
57
61
  ```js
58
62
  new BedrockPortal(auth, {
59
- ...,
60
- modules: {
61
- autoFriendAdd: true, // Automatically add friends to the session
62
- },
63
+ ...,
64
+ modules: {
65
+ autoFriendAdd: true, // Automatically add friends to the session
66
+ },
63
67
  })
64
68
  ```
65
69
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bedrock-portal",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
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": {
@@ -7,7 +7,7 @@ module.exports = {
7
7
  MinecraftTitleID: '896928775',
8
8
  MinecraftSCID: '4fc10100-5f7a-4470-899b-280835760c07',
9
9
  MinecraftTemplateName: 'MinecraftLobby',
10
- MiencraftProtocolVersion: 554,
10
+ MiencraftProtocolVersion: 560,
11
11
  },
12
12
  Joinability: {
13
13
  invite_only: {