From c1e31f29e32a01d70e0bbd9cfa561e8cad482d0e Mon Sep 17 00:00:00 2001 From: Heath123 Date: Mon, 3 Aug 2020 19:55:23 +0100 Subject: [PATCH] Fix using the packet name instead of a meta object in scripts --- src/proxy/java/proxy.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/proxy/java/proxy.js b/src/proxy/java/proxy.js index ad7a2ce..640112a 100644 --- a/src/proxy/java/proxy.js +++ b/src/proxy/java/proxy.js @@ -140,6 +140,9 @@ exports.writeToClient = function (meta, data, noCallback) { } exports.writeToServer = function (meta, data, noCallback) { + if (typeof meta === 'string') { + meta = { name: meta } + } realServer.write(meta.name, data) const id = Object.keys(toServerMappings).find(key => toServerMappings[key] === meta.name) if (!noCallback) {