async store_value(data) {
        // Sends the data to the backend 
        let message = this.toString()
        message.body.data = data;
        this.send_backend_message(message)

        // Creates a promise for the event data once it is returned 
        return new Promise(function(resolve, reject) {
            document.addEventListener(this.uuid, (result) => {
                if(result.detail.success)
                    resolve(result.detail.data);
                else
                    reject(result.detail.data);
            })
        }.bind(this))
    }
/**
     * Takes in data from the game, packages it inside a proper container
     * for the back end and sends it.
     * 
     * @param {JSON} data - Message from the game
     */
Takes in data from the game, packages it inside a proper container
for the back end and sends it.

@param {JSON} data - Message from the game
Takes in data from the game packages it inside a proper container for the back end and sends it . @param { JSON } data - Message from the game
async store_value(data) {
        let message = this.toString()
        message.body.data = data;
        this.send_backend_message(message)
        return new Promise(function(resolve, reject) {
            document.addEventListener(this.uuid, (result) => {
                if(result.detail.success)
                    resolve(result.detail.data);
                else
                    reject(result.detail.data);
            })
        }.bind(this))
    }
async store_value ( data ) { let message = this . toString ( ) message . body . data = data ; this . send_backend_message ( message ) return new Promise ( function ( resolve , reject ) { document . addEventListener ( this . uuid , ( result ) => { if ( result . detail . success ) resolve ( result . detail . data ) ; else reject ( result . detail . data ) ; } ) } . bind ( this ) ) }
Takes in data from the game, packages it inside a proper container
 for the back end and sends it.
Takes in data from the game packages it inside a proper container for the back end and sends it .
// Sends the data to the backend  // Creates a promise for the event data once it is returned 