prevent structureVerifier from having multiple instances

This commit is contained in:
ForestOfLight
2025-06-04 19:05:44 -07:00
Unverified
parent 6ad128cc9c
commit 7b0afc529d
4 changed files with 19 additions and 6 deletions
+1 -1
View File
@@ -91,7 +91,7 @@ export class MenuForm {
const structureId = response.formValues[0];
if (structureId === '')
return void 0;
if (!structureCollection.getWorldStructureIds().includes(structureId)) {
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;
}