Please go ahead and delete everything you wrote in the previous index.js, and write the following. import { world } from "@minecraft/server"; world.beforeEvents ...