NPCs included, finishing touches zijn nog nodig
This commit is contained in:
15
scripts/Commandeer/utils/entityUtils.ts
Normal file
15
scripts/Commandeer/utils/entityUtils.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { system, world } from "@minecraft/server";
|
||||
|
||||
function runEntityEventOnTag(tag: string, event: string) {
|
||||
system.run(() => {
|
||||
world.getDimension("overworld").runCommand(`/event entity @e[tag=${tag}] ${event}`);
|
||||
});
|
||||
}
|
||||
|
||||
function setNPCDialog(npcTag: string, dialogId: string) {
|
||||
system.run(() => {
|
||||
world.getDimension("overworld").runCommand(`/dialogue change @e[tag=${npcTag}] ${dialogId} @a`);
|
||||
});
|
||||
}
|
||||
|
||||
export { runEntityEventOnTag, setNPCDialog };
|
||||
Reference in New Issue
Block a user