@lazy //takes name of table. metadata must already exist. function createTable(name) { logger(2, database.createTable, "Creating table: $name"); Array.forEach( "ferdinland:ferdinland", "database.tables.$name.fields", ()=>{tellraw @a {"storage":"ferdinland:ferdinland", "nbt":"database.tables.$name.fields[0]"};} ); } class database { @add(__load__) function __init__() {} @add(this.__init__) function schema() {} @add(this.schema) function tables.myTable() { ::database.tables.myTable.name = "myTable"; ::database.tables.myTable.fields = ["one", "two"]; createTable(myTable); } }