@Override
    public void received(Connection c, Object o){
        if(o instanceof LoginDataPacket) {
            LoginDataPacket packet = (LoginDataPacket) o;
            if(packet.username.isEmpty() || packet.password.isEmpty())
            {
                Protocol.sendError(c, ERROR.WRONG_LOGIN_DATA);
                return;
            }
            
            User u = new User();
            System.out.println("Received: "+packet.username+" - "+packet.password);
            u.find(packet.username, packet.password);
            if(!u.login())
            {
                System.out.println("Sending Error.");
                Protocol.sendError(c, ERROR.WRONG_LOGIN_DATA);
                return;
            }
            System.out.println("Sending UserInfo.");
            Protocol.sendUserInfo(c, u);
        }
    }