Major runtime improvements
This commit is contained in:
@@ -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;
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user