@minecraft/server-admin 1.0.0-beta.1.26.10-preview.27 → 1.0.0-beta.1.26.20-preview.20
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 +28 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -429,6 +429,15 @@ export class AllowListModificationError extends Error {
|
|
|
429
429
|
private constructor();
|
|
430
430
|
}
|
|
431
431
|
|
|
432
|
+
/**
|
|
433
|
+
* An error which is thrown when attempting to kick a player
|
|
434
|
+
* who cannot be kicked.
|
|
435
|
+
*/
|
|
436
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
437
|
+
export class CannotKickPlayerError extends Error {
|
|
438
|
+
private constructor();
|
|
439
|
+
}
|
|
440
|
+
|
|
432
441
|
/**
|
|
433
442
|
* An error that is thrown when trying to interact with a join
|
|
434
443
|
* event and the player is disconnected.
|
|
@@ -456,6 +465,25 @@ export class LevelStorageSaveStateChangeError extends Error {
|
|
|
456
465
|
private constructor();
|
|
457
466
|
}
|
|
458
467
|
|
|
468
|
+
/**
|
|
469
|
+
* @remarks
|
|
470
|
+
* Kicks a player from the server.
|
|
471
|
+
*
|
|
472
|
+
* This function can't be called in restricted-execution mode.
|
|
473
|
+
*
|
|
474
|
+
* @param player
|
|
475
|
+
* Player to kick.
|
|
476
|
+
* @param reason
|
|
477
|
+
* Reason for kicking the player.
|
|
478
|
+
* @throws This function can throw errors.
|
|
479
|
+
*
|
|
480
|
+
* {@link CannotKickPlayerError}
|
|
481
|
+
*
|
|
482
|
+
* {@link minecraftcommon.EngineError}
|
|
483
|
+
*
|
|
484
|
+
* {@link minecraftcommon.InvalidArgumentError}
|
|
485
|
+
*/
|
|
486
|
+
export function kickPlayer(player: minecraftserver.Player, reason?: string): void;
|
|
459
487
|
/**
|
|
460
488
|
* @remarks
|
|
461
489
|
* Transfer player to another server.
|