diff --git a/src/main/java/fr/xephi/authme/service/bungeecord/BungeeReceiver.java b/src/main/java/fr/xephi/authme/service/bungeecord/BungeeReceiver.java index faeedb644..189b7d4f3 100644 --- a/src/main/java/fr/xephi/authme/service/bungeecord/BungeeReceiver.java +++ b/src/main/java/fr/xephi/authme/service/bungeecord/BungeeReceiver.java @@ -66,7 +66,14 @@ public class BungeeReceiver implements PluginMessageListener, SettingsDependent return; } - String argument = in.readUTF(); + String argument; + try { + argument = in.readUTF(); + } catch (IllegalStateException e) { + ConsoleLogger.warning("Received invalid plugin message of type " + type.get().name() + ": argument is missing!"); + return; + } + switch (type.get()) { case UNREGISTER: dataSource.invalidateCache(argument);