@minecraft/server-ui 2.1.0-beta.1.26.10-preview.23 → 2.1.0-beta.1.26.10-preview.24
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 +40 -21
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -259,13 +259,8 @@ export declare class CustomForm {
|
|
|
259
259
|
): CustomForm;
|
|
260
260
|
/**
|
|
261
261
|
* @remarks
|
|
262
|
-
*
|
|
263
|
-
*
|
|
264
|
-
*/
|
|
265
|
-
canShow(): boolean;
|
|
266
|
-
/**
|
|
267
|
-
* @remarks
|
|
268
|
-
* Closes the form. Throws an error if the form is not open.
|
|
262
|
+
* Tell the client to close the form. Throws an error if the
|
|
263
|
+
* form is not open.
|
|
269
264
|
*
|
|
270
265
|
*/
|
|
271
266
|
close(): void;
|
|
@@ -303,6 +298,13 @@ export declare class CustomForm {
|
|
|
303
298
|
text: Observable<string> | Observable<UIRawMessage> | string | UIRawMessage,
|
|
304
299
|
options?: TextOptions,
|
|
305
300
|
): CustomForm;
|
|
301
|
+
/**
|
|
302
|
+
* @remarks
|
|
303
|
+
* Returns true if the form is currently being shown to the
|
|
304
|
+
* player.
|
|
305
|
+
*
|
|
306
|
+
*/
|
|
307
|
+
isShowing(): boolean;
|
|
306
308
|
/**
|
|
307
309
|
* @remarks
|
|
308
310
|
* Inserts a label (i.e. medium sized text) into the Custom
|
|
@@ -315,12 +317,14 @@ export declare class CustomForm {
|
|
|
315
317
|
): CustomForm;
|
|
316
318
|
/**
|
|
317
319
|
* @remarks
|
|
318
|
-
* Shows the form to the player. Will
|
|
319
|
-
*
|
|
320
|
-
*
|
|
320
|
+
* Shows the form to the player. Will return false if the
|
|
321
|
+
* client was busy (i.e. in another menu or this one is open).
|
|
322
|
+
* Will throw if the user disconnects.
|
|
321
323
|
*
|
|
324
|
+
* @throws
|
|
325
|
+
* *
|
|
322
326
|
*/
|
|
323
|
-
show(): Promise<
|
|
327
|
+
show(): Promise<boolean>;
|
|
324
328
|
/**
|
|
325
329
|
* @remarks
|
|
326
330
|
* Creates a slider that lets players pick a number between
|
|
@@ -401,14 +405,15 @@ export class FormResponse {
|
|
|
401
405
|
export declare class MessageBox {
|
|
402
406
|
/**
|
|
403
407
|
* @remarks
|
|
404
|
-
* Sets the data for the text in the body of the
|
|
405
|
-
* contained within a scroll view to allow for lots of
|
|
408
|
+
* Sets the data for the text in the body of the message box.
|
|
409
|
+
* It is contained within a scroll view to allow for lots of
|
|
410
|
+
* text.
|
|
406
411
|
*
|
|
407
412
|
*/
|
|
408
413
|
body(text: Observable<string> | Observable<UIRawMessage> | string | UIRawMessage): MessageBox;
|
|
409
414
|
/**
|
|
410
415
|
* @remarks
|
|
411
|
-
* Sets the data for the top button in the
|
|
416
|
+
* Sets the data for the top button in the message box.
|
|
412
417
|
*
|
|
413
418
|
*/
|
|
414
419
|
button1(
|
|
@@ -417,7 +422,7 @@ export declare class MessageBox {
|
|
|
417
422
|
): MessageBox;
|
|
418
423
|
/**
|
|
419
424
|
* @remarks
|
|
420
|
-
* Sets the data for the bottom button in the
|
|
425
|
+
* Sets the data for the bottom button in the message box.
|
|
421
426
|
*
|
|
422
427
|
*/
|
|
423
428
|
button2(
|
|
@@ -426,22 +431,30 @@ export declare class MessageBox {
|
|
|
426
431
|
): MessageBox;
|
|
427
432
|
/**
|
|
428
433
|
* @remarks
|
|
429
|
-
*
|
|
430
|
-
* open.
|
|
434
|
+
* Tell the client to close the message box. Throws {@link
|
|
435
|
+
* FormCloseError} if the message box is not open.
|
|
431
436
|
*
|
|
432
437
|
*/
|
|
433
438
|
close(): void;
|
|
434
439
|
/**
|
|
435
440
|
* @remarks
|
|
436
|
-
*
|
|
437
|
-
*
|
|
441
|
+
* Returns true if the message box is currently being shown to
|
|
442
|
+
* the player.
|
|
443
|
+
*
|
|
444
|
+
*/
|
|
445
|
+
isShowing(): boolean;
|
|
446
|
+
/**
|
|
447
|
+
* @remarks
|
|
448
|
+
* Show this message box to the player. Will return a result
|
|
449
|
+
* even if the client was busy (i.e. in another menu). Will
|
|
450
|
+
* throw if the user disconnects.
|
|
438
451
|
*
|
|
439
452
|
*/
|
|
440
453
|
show(): Promise<MessageBoxResult>;
|
|
441
454
|
/**
|
|
442
455
|
* @remarks
|
|
443
|
-
* Creates a message
|
|
444
|
-
*
|
|
456
|
+
* Creates a message box for a certain player. Use this instead
|
|
457
|
+
* of a constructor.
|
|
445
458
|
*
|
|
446
459
|
*/
|
|
447
460
|
static create(
|
|
@@ -1004,6 +1017,12 @@ export interface MessageBoxResult {
|
|
|
1004
1017
|
*
|
|
1005
1018
|
*/
|
|
1006
1019
|
selection?: number;
|
|
1020
|
+
/**
|
|
1021
|
+
* @remarks
|
|
1022
|
+
* Whether the message box was shown
|
|
1023
|
+
*
|
|
1024
|
+
*/
|
|
1025
|
+
wasShown: boolean;
|
|
1007
1026
|
}
|
|
1008
1027
|
|
|
1009
1028
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@minecraft/server-ui",
|
|
3
|
-
"version": "2.1.0-beta.1.26.10-preview.
|
|
3
|
+
"version": "2.1.0-beta.1.26.10-preview.24",
|
|
4
4
|
"description": "",
|
|
5
5
|
"contributors": [
|
|
6
6
|
{
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
],
|
|
15
15
|
"peerDependencies": {
|
|
16
16
|
"@minecraft/common": "^1.0.0",
|
|
17
|
-
"@minecraft/server": "^2.0.0 || ^2.7.0-beta.1.26.10-preview.
|
|
17
|
+
"@minecraft/server": "^2.0.0 || ^2.7.0-beta.1.26.10-preview.24"
|
|
18
18
|
},
|
|
19
19
|
"license": "MIT"
|
|
20
20
|
}
|