diff --git a/sharedPlugins/globalChat/index.js b/sharedPlugins/globalChat/index.js index 65fe7738..99622368 100644 --- a/sharedPlugins/globalChat/index.js +++ b/sharedPlugins/globalChat/index.js @@ -22,12 +22,15 @@ module.exports = class remoteCommands { words.shift(); words.shift(); words.shift(); - let message = words.join(" ").replace(/[";]/g, " ").replace(/[']/g,"").replace("/shout ", "").replace("!shout", ""); + let message = words.join(" ").replace(/[";]/g, " ").replace(/[']/g,"").replace("/shout ", "").replace("!shout ","").replace(/\[gps=.*?\]/g, "").replace(/\[train=.*?\]/g, ""); - let instance = await this.getInstanceName(data.instanceID); - - this.messageInterface("/silent-command game.print('[" + instance + "] " + message + "')"); - } + let instance = await this.getInstanceName(data.instanceID); + if(data.data.includes("[gps=")){ + //Nothing + }else{ + this.messageInterface("/silent-command game.print('[" + instance + "] " + message + "')"); + } + } } }); }