hey ! this is my script :
PlayerEvents.loggedIn(event => { //when a player log in
if (!event.player.stages.has('new_join')){
while(!event.player.stages.has('new_join')){ //run until he has the new_join tag,
event.player.teleportTo((Math.random() * 10000) - 5000, 64, (Math.random() * 10000) - 5000); //random tp the player
let {x, y, z} = event.player; //get is cord in x y and z
let aabb = AABB.of(x + 250, 63, z + 250, x - 250, 65, z - 250); //select all entity at a 250 square range from the player at layer 64
if (!(event.level.getEntitiesWithin(aabb).forEach(entity => {//for eatch entities of the selection
if (entity.type == "minecraft:marker" && entity.tags.has('island_spawn')) //is the entity a marker with the tag island_spawn (it mean an island ...)
{
return true;
}
}))
)
{
event.player.stages.add('new_join'); // add the tag new join to the player to mean that it go is island position
}
}
event.server.runCommand(`execute as ${event.player.username} at ${event.player.username} run summon minecraft:marker ~ ~ ~ {Tags:["island_spawn"]}`);//summon the marker to set the place as an island pos
event.server.runCommand(`execute as ${event.player.username} at ${event.player.username} run spawnpoint`); //set the player spawn here
event.server.runCommand(`execute as ${event.player.username} at ${event.player.username} run setblock ~ ~ ~ minecraft:structure_block{mode: "LOAD", name: "from_nothing:island"}`); //set block a structure block with a loaded structure, command work when typed in the chat but dont do anything and show any log in the case of script execution
}
});```
as you can see i use 3 run commands, the two first one work and output
but the last one doesnt do anything



