@minecraft/server-admin 1.0.0-beta.1.21.90-preview.23 → 1.0.0-beta.1.21.90-preview.26
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/index.d.ts +38 -5
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -208,6 +208,38 @@ export class ServerVariables {
|
|
|
208
208
|
get(name: string): unknown | undefined;
|
|
209
209
|
}
|
|
210
210
|
|
|
211
|
+
/**
|
|
212
|
+
* Options when transferring a player to a server that supports
|
|
213
|
+
* direct host/port connections.
|
|
214
|
+
*/
|
|
215
|
+
export interface TransferPlayerIpPortOptions {
|
|
216
|
+
/**
|
|
217
|
+
* @remarks
|
|
218
|
+
* Hostname of the destination server.
|
|
219
|
+
*
|
|
220
|
+
*/
|
|
221
|
+
hostname: string;
|
|
222
|
+
/**
|
|
223
|
+
* @remarks
|
|
224
|
+
* Port of the destination server.
|
|
225
|
+
*
|
|
226
|
+
*/
|
|
227
|
+
port: number;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* Options when transferring a player to a server that supports
|
|
232
|
+
* NetherNet connections.
|
|
233
|
+
*/
|
|
234
|
+
export interface TransferPlayerNetherNetOptions {
|
|
235
|
+
/**
|
|
236
|
+
* @remarks
|
|
237
|
+
* NetherNet ID of the destination server.
|
|
238
|
+
*
|
|
239
|
+
*/
|
|
240
|
+
netherNetId: string;
|
|
241
|
+
}
|
|
242
|
+
|
|
211
243
|
/**
|
|
212
244
|
* An error that is thrown when trying to interact with a join
|
|
213
245
|
* event and the player is disconnected.
|
|
@@ -233,13 +265,14 @@ export class DisconnectedError extends Error {
|
|
|
233
265
|
*
|
|
234
266
|
* @param player
|
|
235
267
|
* Player to transfer.
|
|
236
|
-
* @param
|
|
237
|
-
*
|
|
238
|
-
* @param port
|
|
239
|
-
* Port of the server to transfer to.
|
|
268
|
+
* @param options
|
|
269
|
+
* Options for where to send the player.
|
|
240
270
|
* @throws This function can throw errors.
|
|
241
271
|
*/
|
|
242
|
-
export function transferPlayer(
|
|
272
|
+
export function transferPlayer(
|
|
273
|
+
player: minecraftserver.Player,
|
|
274
|
+
options: TransferPlayerIpPortOptions | TransferPlayerNetherNetOptions,
|
|
275
|
+
): void;
|
|
243
276
|
export const beforeEvents: AdminBeforeEvents;
|
|
244
277
|
/**
|
|
245
278
|
* @remarks
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@minecraft/server-admin",
|
|
3
|
-
"version": "1.0.0-beta.1.21.90-preview.
|
|
3
|
+
"version": "1.0.0-beta.1.21.90-preview.26",
|
|
4
4
|
"description": "",
|
|
5
5
|
"contributors": [
|
|
6
6
|
{
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
],
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"@minecraft/common": "^1.0.0",
|
|
17
|
-
"@minecraft/server": "^1.17.0 || ^2.0.0-rc.1.21.90-preview.
|
|
17
|
+
"@minecraft/server": "^1.17.0 || ^2.0.0-rc.1.21.90-preview.26"
|
|
18
18
|
},
|
|
19
19
|
"license": "MIT"
|
|
20
20
|
}
|