diff --git a/src/main/java/io/graversen/rust/rcon/event/oxide/OxidePluginEventParser.java b/src/main/java/io/graversen/rust/rcon/event/oxide/OxidePluginEventParser.java index 55baf31..a916721 100644 --- a/src/main/java/io/graversen/rust/rcon/event/oxide/OxidePluginEventParser.java +++ b/src/main/java/io/graversen/rust/rcon/event/oxide/OxidePluginEventParser.java @@ -19,6 +19,11 @@ protected Function> eventParser() { final var message = payload.getMessage(); final var pluginName = message.substring(message.indexOf('[') + 1, message.indexOf(']')).trim(); final var pluginMessage = message.substring(pluginName.length() + 2).trim(); + + if (pluginName.isEmpty() || pluginMessage.isEmpty()) { + return Optional.empty(); + } + final var oxidePluginEvent = new OxidePluginEvent(pluginName, pluginMessage); return Optional.of(oxidePluginEvent); };