diff --git a/scripts/minecraft.js b/scripts/minecraft.js index a448c49..b578d7d 100644 --- a/scripts/minecraft.js +++ b/scripts/minecraft.js @@ -22,9 +22,9 @@ const messageTypes = { EVENT: 3 }; -const chatMessageRegex = /^\[(?:.*?)\]: \<(?.*)\> (?.*)/; -const joinNotificationRegex = /^\[(?:.*?)\]: (?.*) joined the game/; -const leaveNotificationRegex = /^\[(?:.*?)\]: (?.*) left the game/; +const chatMessageRegex = /^\[(?:.*?)\]: \<(?[a-zA-Z0-9]+)\> (?.*)/; +const joinNotificationRegex = /^\[(?:.*?)\]: (?[a-zA-Z0-9]+) joined the game/; +const leaveNotificationRegex = /^\[(?:.*?)\]: (?[a-zA-Z0-9]+) left the game/; const rconConnection = new Rcon("localhost", "25575", process.env.RCON_PASSWORD); export default class GatewayClient {