@minecraft/server-admin 1.0.0-beta.1.21.95-stable → 1.0.0-beta.1.26.0-preview.25

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.
Files changed (2) hide show
  1. package/index.d.ts +28 -5
  2. package/package.json +2 -2
package/index.d.ts CHANGED
@@ -60,8 +60,31 @@ export class AsyncPlayerJoinBeforeEvent {
60
60
  readonly persistentId: string;
61
61
  /**
62
62
  * @remarks
63
- * Call this to disconnect a player. They will be allowed to
64
- * try to join again.
63
+ * Call this to explicitly allow the player to join the server.
64
+ * This is useful when player joining is disabled
65
+ * (`allow-player-joining` is set to `false` when playing on
66
+ * dedicated server).
67
+ *
68
+ * @throws This function can throw errors.
69
+ *
70
+ * {@link DisconnectedError}
71
+ */
72
+ allowJoin(): void;
73
+ /**
74
+ * @remarks
75
+ * Deprecated - use {@link disallowJoin} instead.Call this to
76
+ * disconnect a player. They will be allowed to try to join
77
+ * again.
78
+ *
79
+ * @throws This function can throw errors.
80
+ *
81
+ * {@link DisconnectedError}
82
+ */
83
+ disallowJoin(reason?: string): void;
84
+ /**
85
+ * @remarks
86
+ * Call this to stop the player from joining the server. They
87
+ * will be allowed to try to join again.
65
88
  *
66
89
  * @throws This function can throw errors.
67
90
  *
@@ -149,7 +172,7 @@ export class ServerSecrets {
149
172
  * HttpHeader, this Secret is resolved at the time of execution
150
173
  * but is not made available to the script environment.
151
174
  *
152
- * This function can't be called in read-only mode.
175
+ * This function can't be called in restricted-execution mode.
153
176
  *
154
177
  * This function can be called in early-execution mode.
155
178
  *
@@ -200,7 +223,7 @@ export class ServerVariables {
200
223
  * Returns the value of variable that has been configured in a
201
224
  * dedicated server configuration JSON file.
202
225
  *
203
- * This function can't be called in read-only mode.
226
+ * This function can't be called in restricted-execution mode.
204
227
  *
205
228
  * This function can be called in early-execution mode.
206
229
  *
@@ -261,7 +284,7 @@ export class DisconnectedError extends Error {
261
284
  * @remarks
262
285
  * Transfer player to another server.
263
286
  *
264
- * This function can't be called in read-only mode.
287
+ * This function can't be called in restricted-execution mode.
265
288
  *
266
289
  * @param player
267
290
  * Player to transfer.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@minecraft/server-admin",
3
- "version": "1.0.0-beta.1.21.95-stable",
3
+ "version": "1.0.0-beta.1.26.0-preview.25",
4
4
  "description": "",
5
5
  "contributors": [
6
6
  {
@@ -12,7 +12,7 @@
12
12
  "email": "mikeam@microsoft.com"
13
13
  }
14
14
  ],
15
- "dependencies": {
15
+ "peerDependencies": {
16
16
  "@minecraft/common": "^1.0.0",
17
17
  "@minecraft/server": "^1.17.0 || ^2.0.0"
18
18
  },