import * as mc from '@minecraft/server';

export default class Commands {
    static command() {
        return this;
    }
    
    static run(command, target) {
        // return target?.runCommandAsync(command);
        return target?.runCommand(command);
    }
    
    static runList(commands, target) {
        if (Array.isArray(commands)) {
            for (let i in commands) {
                this.run(commands[i], target);
            }
        }
    }
    
}

