@minecraft/server 1.1.0-beta.1.19.70-preview.26 → 1.1.0-beta.1.19.70-stable
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 +0 -2
- package/index.d.ts +285 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
Contains many types related to manipulating a Minecraft world, including entities, blocks, dimensions, and more.
|
|
4
4
|
|
|
5
|
-
## **NOTE: This version of this module is still in pre-release. It may change or it may be removed in future releases.**
|
|
6
|
-
|
|
7
5
|
See full documentation for this module here:
|
|
8
6
|
|
|
9
7
|
https://learn.microsoft.com/en-us/minecraft/creator/scriptapi/@minecraft/server/@minecraft/server
|
package/index.d.ts
CHANGED
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
Copyright (c) Microsoft Corporation.
|
|
8
8
|
***************************************************************************** */
|
|
9
9
|
/**
|
|
10
|
-
* @beta
|
|
11
10
|
* @packageDocumentation
|
|
12
11
|
* Contains many types related to manipulating a Minecraft
|
|
13
12
|
* world, including entities, blocks, dimensions, and more.
|
|
@@ -16,7 +15,7 @@
|
|
|
16
15
|
* ```json
|
|
17
16
|
* {
|
|
18
17
|
* "module_name": "@minecraft/server",
|
|
19
|
-
* "version": "1.
|
|
18
|
+
* "version": "1.0.0"
|
|
20
19
|
* }
|
|
21
20
|
* ```
|
|
22
21
|
*
|
|
@@ -1878,6 +1877,24 @@ export class Dimension {
|
|
|
1878
1877
|
* ```
|
|
1879
1878
|
*/
|
|
1880
1879
|
createExplosion(location: Vector3, radius: number, explosionOptions?: ExplosionOptions): void;
|
|
1880
|
+
/**
|
|
1881
|
+
* @beta
|
|
1882
|
+
* @remarks
|
|
1883
|
+
* Fills an area between begin and end with block of type
|
|
1884
|
+
* block.
|
|
1885
|
+
* @param begin
|
|
1886
|
+
* The lower northwest starting corner of the area.
|
|
1887
|
+
* @param end
|
|
1888
|
+
* The upper southeast ending corner of the area.
|
|
1889
|
+
* @param block
|
|
1890
|
+
* Type of block to fill the volume with.
|
|
1891
|
+
* @param options
|
|
1892
|
+
* A set of additional options, such as a matching block to
|
|
1893
|
+
* potentially replace this fill block with.
|
|
1894
|
+
* @returns
|
|
1895
|
+
* Returns number of blocks placed.
|
|
1896
|
+
* @throws This function can throw errors.
|
|
1897
|
+
*/
|
|
1881
1898
|
fillBlocks(begin: Vector3, end: Vector3, block: BlockPermutation | BlockType, options?: BlockFillOptions): number;
|
|
1882
1899
|
/**
|
|
1883
1900
|
* @beta
|
|
@@ -2112,21 +2129,21 @@ export class DirectionBlockProperty {
|
|
|
2112
2129
|
export class DynamicPropertiesDefinition {
|
|
2113
2130
|
/**
|
|
2114
2131
|
* @remarks
|
|
2115
|
-
* Defines a
|
|
2132
|
+
* Defines a boolean dynamic property.
|
|
2116
2133
|
* @param identifier
|
|
2117
2134
|
* @throws This function can throw errors.
|
|
2118
2135
|
*/
|
|
2119
2136
|
defineBoolean(identifier: string): void;
|
|
2120
2137
|
/**
|
|
2121
2138
|
* @remarks
|
|
2122
|
-
* Defines a
|
|
2139
|
+
* Defines a number dynamic property.
|
|
2123
2140
|
* @param identifier
|
|
2124
2141
|
* @throws This function can throw errors.
|
|
2125
2142
|
*/
|
|
2126
2143
|
defineNumber(identifier: string): void;
|
|
2127
2144
|
/**
|
|
2128
2145
|
* @remarks
|
|
2129
|
-
* Defines a
|
|
2146
|
+
* Defines a string dynamic property.
|
|
2130
2147
|
* @param identifier
|
|
2131
2148
|
* @param maxLength
|
|
2132
2149
|
* @throws This function can throw errors.
|
|
@@ -2252,6 +2269,11 @@ export class EnchantmentList implements Iterable<Enchantment> {
|
|
|
2252
2269
|
* The item slot/type that this collection is applied to.
|
|
2253
2270
|
*/
|
|
2254
2271
|
readonly slot: number;
|
|
2272
|
+
/**
|
|
2273
|
+
* @remarks
|
|
2274
|
+
* Creates a new EnchantmentList.
|
|
2275
|
+
* @param enchantmentSlot
|
|
2276
|
+
*/
|
|
2255
2277
|
constructor(enchantmentSlot: number);
|
|
2256
2278
|
[Symbol.iterator](): Iterator<Enchantment>;
|
|
2257
2279
|
/**
|
|
@@ -2450,10 +2472,33 @@ export class Entity {
|
|
|
2450
2472
|
* @throws This function can throw errors.
|
|
2451
2473
|
*/
|
|
2452
2474
|
addTag(tag: string): boolean;
|
|
2475
|
+
/**
|
|
2476
|
+
* @beta
|
|
2477
|
+
* @remarks
|
|
2478
|
+
* Applies a set of damage to an entity.
|
|
2479
|
+
* @param amount
|
|
2480
|
+
* Amount of damage to apply.
|
|
2481
|
+
* @param source
|
|
2482
|
+
* Additional option about the source of damage, which may add
|
|
2483
|
+
* additional effects or spur additional behaviors on this
|
|
2484
|
+
* entity.
|
|
2485
|
+
* @throws This function can throw errors.
|
|
2486
|
+
*/
|
|
2453
2487
|
applyDamage(amount: number, source?: EntityDamageSource): boolean;
|
|
2454
2488
|
applyImpulse(vector: Vector3): void;
|
|
2455
2489
|
applyKnockback(directionX: number, directionZ: number, horizontalStrength: number, verticalStrength: number): void;
|
|
2456
2490
|
clearVelocity(): void;
|
|
2491
|
+
/**
|
|
2492
|
+
* @beta
|
|
2493
|
+
* @remarks
|
|
2494
|
+
* Extinguishes the fire if the entity is on fire. Note that
|
|
2495
|
+
* you can call getComponent('minecraft:onfire') and, if
|
|
2496
|
+
* present, the entity is on fire.
|
|
2497
|
+
* @param useEffects
|
|
2498
|
+
* Whether to show any visual effects connected to the
|
|
2499
|
+
* extinguishing.
|
|
2500
|
+
* @throws This function can throw errors.
|
|
2501
|
+
*/
|
|
2457
2502
|
extinguishFire(useEffects?: boolean): boolean;
|
|
2458
2503
|
/**
|
|
2459
2504
|
* @beta
|
|
@@ -2506,6 +2551,14 @@ export class Entity {
|
|
|
2506
2551
|
* @throws This function can throw errors.
|
|
2507
2552
|
*/
|
|
2508
2553
|
getEffect(effectType: EffectType): Effect;
|
|
2554
|
+
/**
|
|
2555
|
+
* @beta
|
|
2556
|
+
* @remarks
|
|
2557
|
+
* Returns a set of effects applied to this item.
|
|
2558
|
+
* @returns
|
|
2559
|
+
* List of effects.
|
|
2560
|
+
* @throws This function can throw errors.
|
|
2561
|
+
*/
|
|
2509
2562
|
getEffects(): Effect[];
|
|
2510
2563
|
/**
|
|
2511
2564
|
* @beta
|
|
@@ -2596,6 +2649,17 @@ export class Entity {
|
|
|
2596
2649
|
* @throws This function can throw errors.
|
|
2597
2650
|
*/
|
|
2598
2651
|
setDynamicProperty(identifier: string, value: boolean | number | string): void;
|
|
2652
|
+
/**
|
|
2653
|
+
* @beta
|
|
2654
|
+
* @remarks
|
|
2655
|
+
* Sets an entity on fire (if it is not in water or rain). Note
|
|
2656
|
+
* that you can call getComponent('minecraft:onfire') and, if
|
|
2657
|
+
* present, the entity is on fire.
|
|
2658
|
+
* @param seconds
|
|
2659
|
+
* Length of time to set the entity on fire.
|
|
2660
|
+
* @param useEffects
|
|
2661
|
+
* @throws This function can throw errors.
|
|
2662
|
+
*/
|
|
2599
2663
|
setOnFire(seconds: number, useEffects?: boolean): boolean;
|
|
2600
2664
|
/**
|
|
2601
2665
|
* @beta
|
|
@@ -3143,6 +3207,10 @@ export class EntityHurtEvent {
|
|
|
3143
3207
|
* Describes the amount of damage caused.
|
|
3144
3208
|
*/
|
|
3145
3209
|
readonly damage: number;
|
|
3210
|
+
/**
|
|
3211
|
+
* Source information on the entity that may have applied this
|
|
3212
|
+
* damage.
|
|
3213
|
+
*/
|
|
3146
3214
|
readonly damageSource: EntityDamageSource;
|
|
3147
3215
|
/**
|
|
3148
3216
|
* Entity that was hurt.
|
|
@@ -4696,9 +4764,19 @@ export class EntityNavigationWalkComponent extends IEntityComponent {
|
|
|
4696
4764
|
*/
|
|
4697
4765
|
static readonly componentId = 'minecraft:navigation.walk';
|
|
4698
4766
|
}
|
|
4767
|
+
/**
|
|
4768
|
+
* @beta
|
|
4769
|
+
* When present on an entity, this entity is on fire.
|
|
4770
|
+
*/
|
|
4699
4771
|
export class EntityOnFireComponent extends IEntityComponent {
|
|
4700
4772
|
protected constructor();
|
|
4773
|
+
/**
|
|
4774
|
+
* The number of ticks remaining before the fire goes out.
|
|
4775
|
+
*/
|
|
4701
4776
|
readonly onFireTicksRemaining: number;
|
|
4777
|
+
/**
|
|
4778
|
+
* Should be 'minecraft:onfire'.
|
|
4779
|
+
*/
|
|
4702
4780
|
readonly typeId: string;
|
|
4703
4781
|
static readonly componentId = 'minecraft:onfire';
|
|
4704
4782
|
}
|
|
@@ -9446,6 +9524,10 @@ export class MinecraftEffectTypes {
|
|
|
9446
9524
|
static readonly weakness: EffectType;
|
|
9447
9525
|
static readonly wither: EffectType;
|
|
9448
9526
|
}
|
|
9527
|
+
/**
|
|
9528
|
+
* @beta
|
|
9529
|
+
* Describes a set of enchantment types.
|
|
9530
|
+
*/
|
|
9449
9531
|
// tslint:disable-next-line:no-unnecessary-class
|
|
9450
9532
|
export class MinecraftEnchantmentTypes {
|
|
9451
9533
|
protected constructor();
|
|
@@ -12492,7 +12574,29 @@ export class Player extends Entity {
|
|
|
12492
12574
|
* @throws This function can throw errors.
|
|
12493
12575
|
*/
|
|
12494
12576
|
addEffect(effectType: EffectType, duration: number, amplifier?: number, showParticles?: boolean): void;
|
|
12577
|
+
/**
|
|
12578
|
+
* @beta
|
|
12579
|
+
* @remarks
|
|
12580
|
+
* Adds/removes experience to/from the Player and returns the
|
|
12581
|
+
* current experience of the Player.
|
|
12582
|
+
* @param amount
|
|
12583
|
+
* Amount of experience to add. Note that this can be negative.
|
|
12584
|
+
* @returns
|
|
12585
|
+
* Returns the current experience of the Player.
|
|
12586
|
+
* @throws This function can throw errors.
|
|
12587
|
+
*/
|
|
12495
12588
|
addExperience(amount: number): number;
|
|
12589
|
+
/**
|
|
12590
|
+
* @beta
|
|
12591
|
+
* @remarks
|
|
12592
|
+
* Adds/removes level to/from the Player and returns the
|
|
12593
|
+
* current level of the Player.
|
|
12594
|
+
* @param amount
|
|
12595
|
+
* Amount to add to the player.
|
|
12596
|
+
* @returns
|
|
12597
|
+
* Returns the current level of the Player.
|
|
12598
|
+
* @throws This function can throw errors.
|
|
12599
|
+
*/
|
|
12496
12600
|
addLevels(amount: number): number;
|
|
12497
12601
|
/**
|
|
12498
12602
|
* @beta
|
|
@@ -12503,11 +12607,33 @@ export class Player extends Entity {
|
|
|
12503
12607
|
* @throws This function can throw errors.
|
|
12504
12608
|
*/
|
|
12505
12609
|
addTag(tag: string): boolean;
|
|
12610
|
+
/**
|
|
12611
|
+
* @beta
|
|
12612
|
+
* @remarks
|
|
12613
|
+
* Applies damage to the player.
|
|
12614
|
+
* @param amount
|
|
12615
|
+
* Amount of damage to apply.
|
|
12616
|
+
* @param source
|
|
12617
|
+
* Additional information around the source of damage that can
|
|
12618
|
+
* apply to the player.
|
|
12619
|
+
* @throws This function can throw errors.
|
|
12620
|
+
*/
|
|
12506
12621
|
applyDamage(amount: number, source?: EntityDamageSource): boolean;
|
|
12507
12622
|
applyImpulse(vector: Vector3): void;
|
|
12508
12623
|
applyKnockback(directionX: number, directionZ: number, horizontalStrength: number, verticalStrength: number): void;
|
|
12509
12624
|
clearSpawn(): void;
|
|
12510
12625
|
clearVelocity(): void;
|
|
12626
|
+
/**
|
|
12627
|
+
* @beta
|
|
12628
|
+
* @remarks
|
|
12629
|
+
* Extinguishes the fire if the player is on fire. Note that
|
|
12630
|
+
* you can call getComponent('minecraft:onfire') and, if
|
|
12631
|
+
* present, the player is on fire."
|
|
12632
|
+
* @param useEffects
|
|
12633
|
+
* Whether to show any visual effects connected to the
|
|
12634
|
+
* extinguishing.
|
|
12635
|
+
* @throws This function can throw errors.
|
|
12636
|
+
*/
|
|
12511
12637
|
extinguishFire(useEffects?: boolean): boolean;
|
|
12512
12638
|
/**
|
|
12513
12639
|
* @beta
|
|
@@ -12560,6 +12686,12 @@ export class Player extends Entity {
|
|
|
12560
12686
|
* @throws This function can throw errors.
|
|
12561
12687
|
*/
|
|
12562
12688
|
getEffect(effectType: EffectType): Effect;
|
|
12689
|
+
/**
|
|
12690
|
+
* @beta
|
|
12691
|
+
* @remarks
|
|
12692
|
+
* Returns a set of effects applied to this player.
|
|
12693
|
+
* @throws This function can throw errors.
|
|
12694
|
+
*/
|
|
12563
12695
|
getEffects(): Effect[];
|
|
12564
12696
|
/**
|
|
12565
12697
|
* @beta
|
|
@@ -12591,6 +12723,12 @@ export class Player extends Entity {
|
|
|
12591
12723
|
* @throws This function can throw errors.
|
|
12592
12724
|
*/
|
|
12593
12725
|
getTags(): string[];
|
|
12726
|
+
/**
|
|
12727
|
+
* @beta
|
|
12728
|
+
* @remarks
|
|
12729
|
+
* Gets the total experience of the Player.
|
|
12730
|
+
* @throws This function can throw errors.
|
|
12731
|
+
*/
|
|
12594
12732
|
getTotalXp(): number;
|
|
12595
12733
|
getVelocity(): Vector3;
|
|
12596
12734
|
getViewDirection(): Vector3;
|
|
@@ -12667,6 +12805,12 @@ export class Player extends Entity {
|
|
|
12667
12805
|
* @throws This function can throw errors.
|
|
12668
12806
|
*/
|
|
12669
12807
|
removeTag(tag: string): boolean;
|
|
12808
|
+
/**
|
|
12809
|
+
* @beta
|
|
12810
|
+
* @remarks
|
|
12811
|
+
* Resets the level of the player.
|
|
12812
|
+
* @throws This function can throw errors.
|
|
12813
|
+
*/
|
|
12670
12814
|
resetLevel(): void;
|
|
12671
12815
|
/**
|
|
12672
12816
|
* @remarks
|
|
@@ -12734,6 +12878,17 @@ export class Player extends Entity {
|
|
|
12734
12878
|
* @throws This function can throw errors.
|
|
12735
12879
|
*/
|
|
12736
12880
|
setDynamicProperty(identifier: string, value: boolean | number | string): void;
|
|
12881
|
+
/**
|
|
12882
|
+
* @beta
|
|
12883
|
+
* @remarks
|
|
12884
|
+
* Sets a player on fire (if it is not in water or rain). Note
|
|
12885
|
+
* that you can call getComponent('minecraft:onfire') and, if
|
|
12886
|
+
* present, the player is on fire.
|
|
12887
|
+
* @param seconds
|
|
12888
|
+
* Length of time to set the player on fire.
|
|
12889
|
+
* @param useEffects
|
|
12890
|
+
* @throws This function can throw errors.
|
|
12891
|
+
*/
|
|
12737
12892
|
setOnFire(seconds: number, useEffects?: boolean): boolean;
|
|
12738
12893
|
/**
|
|
12739
12894
|
* @beta
|
|
@@ -13074,6 +13229,7 @@ export class Scoreboard {
|
|
|
13074
13229
|
* @remarks
|
|
13075
13230
|
* Returns a specific objective (by id).
|
|
13076
13231
|
* @param objectiveId
|
|
13232
|
+
* Identifier of the objective.
|
|
13077
13233
|
* @throws This function can throw errors.
|
|
13078
13234
|
*/
|
|
13079
13235
|
getObjective(objectiveId: string): ScoreboardObjective;
|
|
@@ -13097,6 +13253,17 @@ export class Scoreboard {
|
|
|
13097
13253
|
* @throws This function can throw errors.
|
|
13098
13254
|
*/
|
|
13099
13255
|
getParticipants(): ScoreboardIdentity[];
|
|
13256
|
+
/**
|
|
13257
|
+
* @remarks
|
|
13258
|
+
* Returns a score given an objective and participant.
|
|
13259
|
+
* @param objective
|
|
13260
|
+
* Objective to retrieve the score for.
|
|
13261
|
+
* @param participant
|
|
13262
|
+
* Participant to retrieve the score for.
|
|
13263
|
+
* @returns
|
|
13264
|
+
* Score value.
|
|
13265
|
+
* @throws This function can throw errors.
|
|
13266
|
+
*/
|
|
13100
13267
|
getScore(objective: ScoreboardObjective, participant: ScoreboardIdentity): number;
|
|
13101
13268
|
/**
|
|
13102
13269
|
* @remarks
|
|
@@ -13117,6 +13284,16 @@ export class Scoreboard {
|
|
|
13117
13284
|
displaySlotId: string,
|
|
13118
13285
|
objectiveDisplaySetting: ScoreboardObjectiveDisplayOptions,
|
|
13119
13286
|
): ScoreboardObjective;
|
|
13287
|
+
/**
|
|
13288
|
+
* @remarks
|
|
13289
|
+
* Sets the score given a participant and objective.
|
|
13290
|
+
* @param objective
|
|
13291
|
+
* Objective to use for the scoreboard.
|
|
13292
|
+
* @param participant
|
|
13293
|
+
* Participant to apply the scoreboard value to.
|
|
13294
|
+
* @param score
|
|
13295
|
+
* @throws This function can throw errors.
|
|
13296
|
+
*/
|
|
13120
13297
|
setScore(objective: ScoreboardObjective, participant: ScoreboardIdentity, score: number): boolean;
|
|
13121
13298
|
}
|
|
13122
13299
|
/**
|
|
@@ -13144,8 +13321,35 @@ export class ScoreboardIdentity {
|
|
|
13144
13321
|
* @throws This function can throw errors.
|
|
13145
13322
|
*/
|
|
13146
13323
|
getEntity(): Entity;
|
|
13324
|
+
/**
|
|
13325
|
+
* @remarks
|
|
13326
|
+
* Gets the current score for this participant based on an
|
|
13327
|
+
* objective.
|
|
13328
|
+
* @param objective
|
|
13329
|
+
* The objective to retrieve the score for.
|
|
13330
|
+
* @returns
|
|
13331
|
+
* Score value.
|
|
13332
|
+
* @throws This function can throw errors.
|
|
13333
|
+
*/
|
|
13147
13334
|
getScore(objective: ScoreboardObjective): number;
|
|
13335
|
+
/**
|
|
13336
|
+
* @remarks
|
|
13337
|
+
* Removes this participant from an objective.
|
|
13338
|
+
* @param objective
|
|
13339
|
+
* The objective to remove this participant from.
|
|
13340
|
+
* @throws This function can throw errors.
|
|
13341
|
+
*/
|
|
13148
13342
|
removeFromObjective(objective: ScoreboardObjective): boolean;
|
|
13343
|
+
/**
|
|
13344
|
+
* @remarks
|
|
13345
|
+
* Sets a score for this participant for a particular
|
|
13346
|
+
* objective.
|
|
13347
|
+
* @param objective
|
|
13348
|
+
* Objective to apply the score to.
|
|
13349
|
+
* @param score
|
|
13350
|
+
* Score value.
|
|
13351
|
+
* @throws This function can throw errors.
|
|
13352
|
+
*/
|
|
13149
13353
|
setScore(objective: ScoreboardObjective, score: number): boolean;
|
|
13150
13354
|
}
|
|
13151
13355
|
/**
|
|
@@ -13175,6 +13379,7 @@ export class ScoreboardObjective {
|
|
|
13175
13379
|
* @remarks
|
|
13176
13380
|
* Returns a specific score for a participant.
|
|
13177
13381
|
* @param participant
|
|
13382
|
+
* Identifier of the participant to retrieve a score for.
|
|
13178
13383
|
* @throws This function can throw errors.
|
|
13179
13384
|
*/
|
|
13180
13385
|
getScore(participant: ScoreboardIdentity): number;
|
|
@@ -13185,7 +13390,24 @@ export class ScoreboardObjective {
|
|
|
13185
13390
|
* @throws This function can throw errors.
|
|
13186
13391
|
*/
|
|
13187
13392
|
getScores(): ScoreboardScoreInfo[];
|
|
13393
|
+
/**
|
|
13394
|
+
* @remarks
|
|
13395
|
+
* Removes a participant from this scoreboard objective.
|
|
13396
|
+
* @param participant
|
|
13397
|
+
* Participant to remove from being tracked with this
|
|
13398
|
+
* objective.
|
|
13399
|
+
* @throws This function can throw errors.
|
|
13400
|
+
*/
|
|
13188
13401
|
removeParticipant(participant: ScoreboardIdentity): boolean;
|
|
13402
|
+
/**
|
|
13403
|
+
* @remarks
|
|
13404
|
+
* Sets a score for a participant.
|
|
13405
|
+
* @param participant
|
|
13406
|
+
* Identity of the participant.
|
|
13407
|
+
* @param score
|
|
13408
|
+
* New value of the score.
|
|
13409
|
+
* @throws This function can throw errors.
|
|
13410
|
+
*/
|
|
13189
13411
|
setScore(participant: ScoreboardIdentity, score: number): boolean;
|
|
13190
13412
|
}
|
|
13191
13413
|
/**
|
|
@@ -13244,13 +13466,40 @@ export class ScreenDisplay {
|
|
|
13244
13466
|
*/
|
|
13245
13467
|
updateSubtitle(subtitle: string): void;
|
|
13246
13468
|
}
|
|
13469
|
+
/**
|
|
13470
|
+
* @beta
|
|
13471
|
+
* Returns additional data about a /scriptevent command
|
|
13472
|
+
* invocation.
|
|
13473
|
+
*/
|
|
13247
13474
|
export class ScriptEventCommandMessageEvent {
|
|
13248
13475
|
protected constructor();
|
|
13476
|
+
/**
|
|
13477
|
+
* Identifier of this ScriptEvent command message.
|
|
13478
|
+
*/
|
|
13249
13479
|
readonly id: string;
|
|
13480
|
+
/**
|
|
13481
|
+
* If this command was initiated via an NPC, returns the entity
|
|
13482
|
+
* that initiated the NPC dialogue.
|
|
13483
|
+
*/
|
|
13250
13484
|
readonly initiator: Entity;
|
|
13485
|
+
/**
|
|
13486
|
+
* Optional additional data passed in with the script event
|
|
13487
|
+
* command.
|
|
13488
|
+
*/
|
|
13251
13489
|
readonly message: string;
|
|
13490
|
+
/**
|
|
13491
|
+
* Source block if this command was triggered via a block
|
|
13492
|
+
* (e.g., a commandblock.)
|
|
13493
|
+
*/
|
|
13252
13494
|
readonly sourceBlock: Block;
|
|
13495
|
+
/**
|
|
13496
|
+
* Source entity if this command was triggered by an entity
|
|
13497
|
+
* (e.g., a NPC).
|
|
13498
|
+
*/
|
|
13253
13499
|
readonly sourceEntity: Entity;
|
|
13500
|
+
/**
|
|
13501
|
+
* Returns the type of source that fired this command.
|
|
13502
|
+
*/
|
|
13254
13503
|
readonly sourceType: MessageSourceType;
|
|
13255
13504
|
}
|
|
13256
13505
|
/**
|
|
@@ -13366,7 +13615,33 @@ export class System {
|
|
|
13366
13615
|
* function to cancel the execution of this run.
|
|
13367
13616
|
*/
|
|
13368
13617
|
run(callback: () => void): number;
|
|
13618
|
+
/**
|
|
13619
|
+
* @beta
|
|
13620
|
+
* @remarks
|
|
13621
|
+
* Runs a set of code on an interval.
|
|
13622
|
+
* @param callback
|
|
13623
|
+
* Functional code that will run when this interval occurs.
|
|
13624
|
+
* @param tickInterval
|
|
13625
|
+
* An interval of every N ticks that the callback will be
|
|
13626
|
+
* called upon.
|
|
13627
|
+
* @returns
|
|
13628
|
+
* An opaque handle that can be used with the clearRun method
|
|
13629
|
+
* to stop the run of this function on an interval.
|
|
13630
|
+
*/
|
|
13369
13631
|
runInterval(callback: () => void, tickInterval?: number): number;
|
|
13632
|
+
/**
|
|
13633
|
+
* @beta
|
|
13634
|
+
* @remarks
|
|
13635
|
+
* Runs a set of code at a future time specified by tickDelay.
|
|
13636
|
+
* @param callback
|
|
13637
|
+
* Functional code that will run when this timeout occurs.
|
|
13638
|
+
* @param tickDelay
|
|
13639
|
+
* Amount of time, in ticks, before the interval will be
|
|
13640
|
+
* called.
|
|
13641
|
+
* @returns
|
|
13642
|
+
* An opaque handle that can be used with the clearRun method
|
|
13643
|
+
* to stop the run of this function on an interval.
|
|
13644
|
+
*/
|
|
13370
13645
|
runTimeout(callback: () => void, tickDelay?: number): number;
|
|
13371
13646
|
}
|
|
13372
13647
|
/**
|
|
@@ -13436,6 +13711,11 @@ export class Trigger {
|
|
|
13436
13711
|
* Event name of the trigger.
|
|
13437
13712
|
*/
|
|
13438
13713
|
eventName: string;
|
|
13714
|
+
/**
|
|
13715
|
+
* @remarks
|
|
13716
|
+
* Creates a new trigger.
|
|
13717
|
+
* @param eventName
|
|
13718
|
+
*/
|
|
13439
13719
|
constructor(eventName: string);
|
|
13440
13720
|
}
|
|
13441
13721
|
/**
|