scripteventを実行しようとしたところ、識別子が違うと言われました。sourceEntityを使うのでコマンドブロックにexecute as @p runを入れてみても、<私のゲーマータグ>として実行できないらしいです。どういうことでしょうか。識別子はpracにしているはずなんですけど…。ちなみにコンテンツログには何も出てきません。
import { ActionFormData ,ActionFormResponse } from "@minecraft/server-ui";
system.afterEvents.scriptEventReceive.subscribe(event_data => {
const { id ,message ,sourceEntity } =event_data;
sourceEntity.sendMessage(`${id}を実行`);
if (id ==="prac:00"){
sourceEntity.runCommandAsync("particle minecraft:knockback_roar_particle ~~~");
}
});```
