Major runtime improvements

This commit is contained in:
ForestOfLight
2025-06-07 02:05:55 -07:00
Unverified
parent 0b1fefbeb1
commit 989e23289c
9 changed files with 88 additions and 83 deletions
+5 -4
View File
@@ -66,6 +66,11 @@ export class MenuForm {
this.player.sendMessage(`§cInstance '${instanceName}' already exists. Try again with a new name.`);
return void 0;
}
if (e.name === 'InvalidStructureError') {
this.player.sendMessage(`§cStructure ID '${structureId}' not found. If you're looking for a structure that you put in the structures folder, please restart your world and try again.`);
return void 0;
}
throw e;
}
return instanceName;
});
@@ -91,10 +96,6 @@ export class MenuForm {
const structureId = response.formValues[0];
if (structureId === '')
return void 0;
if (!structureCollection.getWorldStructureIds().some(id => id.replace('mystructure:', '') === structureId)) {
this.player.sendMessage(`§cStructure ID '${structureId}' not found. If you're looking for a structure that you put in the structures folder, please restart your world and try again.`);
return void 0;
}
return structureId;
});
}