if (!signBlock) { console.warn('Could not find a block at specified location.'); return; } constsignPerm = BlockPermutation.resolve('minecraft:standing_sign', { ground_sign_direction:8 }); signBlock.setPermutation(signPerm);
constsignComponent = signBlock.getComponent(BlockComponentTypes.Sign); if (signComponent) { signComponent.setText({ translate:'item.skull.player.name', with: [text] }); } else { console.error('Could not find a sign component on the block.'); } }
messageForm .show(players[0]) .then((formData: MessageFormResponse) => { // player canceled the form, or another dialog was up and open. if (formData.canceled || formData.selection === undefined) { return; }
if (!signBlock) { log("Could not find a block at specified location."); return -1; } constsignPerm = BlockPermutation.resolve(MinecraftBlockTypes.StandingSign, { ground_sign_direction:8 });
Provides a token that will get replaced with the value of a
score.
可选实验性text
text?:string
备注
Provides a string literal value to use.
可选实验性translate
translate?:string
备注
Provides a translation token where, if the client has an
available resource in the players' language which matches
the token, will get translated on the client.
Defines a JSON structure that is used for more flexible.
示例: addTranslatedSign.ts
示例: showTranslatedMessageForm.ts
示例: addTranslatedSign.ts