private void handleMessageFrame(String stringMsg) {
        JsonObject frame = GsonProvider.parser().parse(stringMsg).getAsJsonObject();

        String innerMsg = frame.get("msg").getAsString();
        String signature = frame.get("signature").getAsString();

        if (innerMsg == null || innerMsg.isEmpty() || signature == null || signature.isEmpty()) {
            throw new IllegalArgumentException("Incomplete message");
        }

        // check signature to ensure the message is from the connected editor
        PublicKey remotePublicKey = this.socket.getRemotePublicKey();
        boolean verified = remotePublicKey != null && SignatureAlgorithm.INSTANCE.verify(remotePublicKey, innerMsg, signature);

        // parse the inner message
        JsonObject msg = GsonProvider.parser().parse(innerMsg).getAsJsonObject();
        SocketMessageType type = SocketMessageType.getById(msg.get("type").getAsString());

        if (type == SocketMessageType.HELLO) {
            this.helloHandler.handle(msg);
            return;
        }

        if (!verified) {
            throw new IllegalStateException("Signature not accepted");
        }

        switch (type) {
            case CHANGE_REQUEST:
                this.changeRequestHandler.handle(msg);
                break;
            case CONNECTED:
                this.connectedHandler.handle(msg);
                break;
            case PING:
                this.pingHandler.handle(msg);
                break;
            default:
                throw new IllegalStateException("Invalid message type: " + type);
        }
    }
Checks if incoming messages should be ignored.

@return true if messages should be ignored
common/src/main/java/me/lucko/luckperms/common/webeditor/socket/listener/WebEditorSocketListener.java